Skip to content

Commit c905d5c

Browse files
authored
Merge pull request #24 from NobodyXu/fix/dyn
Fix using trait object `DynNestedProgress`
2 parents f37161f + 967ea46 commit c905d5c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/traits.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,7 @@ mod impls {
245245

246246
impl<'a, T> Count for &'a T
247247
where
248-
T: Count,
248+
T: Count + ?Sized,
249249
{
250250
fn set(&self, step: Step) {
251251
(*self).set(step)
@@ -270,7 +270,7 @@ mod impls {
270270

271271
impl<'a, T> Count for &'a mut T
272272
where
273-
T: Count,
273+
T: Count + ?Sized,
274274
{
275275
fn set(&self, step: Step) {
276276
self.deref().set(step)
@@ -295,7 +295,7 @@ mod impls {
295295

296296
impl<'a, T> Progress for &'a mut T
297297
where
298-
T: Progress,
298+
T: Progress + ?Sized,
299299
{
300300
fn init(&mut self, max: Option<Step>, unit: Option<Unit>) {
301301
self.deref_mut().init(max, unit)
@@ -352,7 +352,7 @@ mod impls {
352352

353353
impl<'a, T> NestedProgress for &'a mut T
354354
where
355-
T: NestedProgress,
355+
T: NestedProgress + ?Sized,
356356
{
357357
type SubProgress = T::SubProgress;
358358

@@ -530,7 +530,7 @@ mod impls {
530530

531531
impl<T> Progress for DynNestedProgressToNestedProgress<T>
532532
where
533-
T: ?Sized + DynNestedProgress,
533+
T: ?Sized + Progress,
534534
{
535535
fn init(&mut self, max: Option<Step>, unit: Option<Unit>) {
536536
self.0.init(max, unit)
@@ -575,7 +575,7 @@ mod impls {
575575

576576
impl<T> Count for DynNestedProgressToNestedProgress<T>
577577
where
578-
T: ?Sized + DynNestedProgress,
578+
T: ?Sized + Count,
579579
{
580580
fn set(&self, step: Step) {
581581
self.0.set(step)

0 commit comments

Comments
 (0)