From 41e6151065e8ea8aba6109ae00b40ae43f51b443 Mon Sep 17 00:00:00 2001 From: Ryo Onodera Date: Mon, 16 Dec 2024 16:13:03 +0900 Subject: [PATCH] Swap impl block order for clearer diff --- unified-scheduler-pool/src/lib.rs | 36 +++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) 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 {