From 796a325972acffcce682f39be747653db83dd71d Mon Sep 17 00:00:00 2001 From: Tamo Date: Thu, 3 Apr 2025 15:53:42 +0200 Subject: [PATCH] Fix typos Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- crates/index-scheduler/src/lib.rs | 2 +- crates/index-scheduler/src/queue/test.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/index-scheduler/src/lib.rs b/crates/index-scheduler/src/lib.rs index 99f62983a..9052b92f1 100644 --- a/crates/index-scheduler/src/lib.rs +++ b/crates/index-scheduler/src/lib.rs @@ -625,7 +625,7 @@ impl IndexScheduler { task_id: Option, dry_run: bool, ) -> Result { - // if the task doesn't delete or cancel anything and 40% of the task queue is full, we must refuse to enqueue the incomming task + // if the task doesn't delete or cancel anything and 40% of the task queue is full, we must refuse to enqueue the incoming task if !matches!(&kind, KindWithContent::TaskDeletion { tasks, .. } | KindWithContent::TaskCancelation { tasks, .. } if !tasks.is_empty()) && (self.env.non_free_pages_size()? * 100) / self.env.info().map_size as u64 > 40 { diff --git a/crates/index-scheduler/src/queue/test.rs b/crates/index-scheduler/src/queue/test.rs index 91f412025..7582da0d6 100644 --- a/crates/index-scheduler/src/queue/test.rs +++ b/crates/index-scheduler/src/queue/test.rs @@ -364,7 +364,7 @@ fn test_task_queue_is_full() { // we won't be able to test this error in an integration test thus as a best effort test I still ensure the error return the expected error code snapshot!(format!("{:?}", result.error_code()), @"NoSpaceLeftOnDevice"); - // Even the task deletion and cancelation that don't delete anything shouldn be refused + // Even the task deletion and cancelation that don't delete anything should be refused let result = index_scheduler .register( KindWithContent::TaskDeletion { query: S("test"), tasks: RoaringBitmap::new() }, @@ -385,7 +385,7 @@ fn test_task_queue_is_full() { // we won't be able to test this error in an integration test thus as a best effort test I still ensure the error return the expected error code snapshot!(format!("{:?}", result.error_code()), @"NoSpaceLeftOnDevice"); - // But a task cancelation that cancel something should works + // But a task cancelation that cancel something should work index_scheduler .register( KindWithContent::TaskCancelation { query: S("test"), tasks: (0..100).collect() },