From 4ae43eb51a95106141c7b63c34f306dbf4189c1e Mon Sep 17 00:00:00 2001 From: Mubelotix Date: Thu, 7 Aug 2025 10:20:10 +0200 Subject: [PATCH] Optimize code --- crates/index-scheduler/src/lib.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/index-scheduler/src/lib.rs b/crates/index-scheduler/src/lib.rs index 6ad7a8397..21b066ac5 100644 --- a/crates/index-scheduler/src/lib.rs +++ b/crates/index-scheduler/src/lib.rs @@ -727,9 +727,7 @@ impl IndexScheduler { // If the registered task is a task cancelation // we inform the processing tasks to stop (if necessary). if let KindWithContent::TaskCancelation { tasks, .. } = kind { - let tasks_to_cancel = RoaringBitmap::from_iter(tasks); - if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks_to_cancel) - { + if self.processing_tasks.read().unwrap().must_cancel_processing_tasks(&tasks) { self.scheduler.must_stop_processing.must_stop(); } }