From 8489464bd3c47a6252dce1914cfa1411b0ea2b98 Mon Sep 17 00:00:00 2001 From: Maybe Waffle Date: Mon, 27 Jun 2022 00:01:31 +0400 Subject: [PATCH] Apply suggestions from the review --- src/dispatching/dispatcher.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dispatching/dispatcher.rs b/src/dispatching/dispatcher.rs index a8178be1..74eace82 100644 --- a/src/dispatching/dispatcher.rs +++ b/src/dispatching/dispatcher.rs @@ -288,7 +288,7 @@ where tokio::pin!(stream); loop { - self.gc_workers_if_needed().await; + self.remove_inactive_workers_if_needed().await; // False positive #[allow(clippy::collapsible_match)] @@ -379,7 +379,7 @@ where } } - async fn gc_workers_if_needed(&mut self) { + async fn remove_inactive_workers_if_needed(&mut self) { let workers = self.workers.len(); let max = self.max_number_of_active_workers.load(Ordering::Relaxed) as usize; @@ -387,11 +387,11 @@ where return; } - self.gc_workers().await; + self.remove_inactive_workers().await; } - #[inline(never)] - async fn gc_workers(&mut self) { + #[inline(never)] // Cold function. + async fn remove_inactive_workers(&mut self) { let handles = self .workers .iter()