diff --git a/unified-scheduler-pool/src/lib.rs b/unified-scheduler-pool/src/lib.rs index daca95f7826791..24b1382aab26a7 100644 --- a/unified-scheduler-pool/src/lib.rs +++ b/unified-scheduler-pool/src/lib.rs @@ -1974,16 +1974,6 @@ impl InstalledScheduler for PooledScheduler { } } -impl UninstalledScheduler for PooledSchedulerInner -where - S: SpawnableScheduler, - TH: TaskHandler, -{ - fn return_to_pool(self: Box) { - self.thread_manager.pool.clone().return_scheduler(*self); - } -} - impl SchedulerInner for PooledSchedulerInner where S: SpawnableScheduler, @@ -2020,6 +2010,16 @@ where } } +impl UninstalledScheduler for PooledSchedulerInner +where + S: SpawnableScheduler, + TH: TaskHandler, +{ + fn return_to_pool(self: Box) { + self.thread_manager.pool.clone().return_scheduler(*self); + } +} + #[cfg(test)] mod tests { use { @@ -3418,14 +3418,6 @@ mod tests { } } - impl UninstalledScheduler - for AsyncScheduler - { - fn return_to_pool(self: Box) { - self.3.clone().return_scheduler(*self) - } - } - impl SchedulerInner for AsyncScheduler { fn id(&self) -> SchedulerId { 42 @@ -3448,6 +3440,14 @@ mod tests { } } + impl UninstalledScheduler + for AsyncScheduler + { + fn return_to_pool(self: Box) { + self.3.clone().return_scheduler(*self) + } + } + impl SpawnableScheduler for AsyncScheduler {