diff --git a/crates/index-scheduler/src/lib.rs b/crates/index-scheduler/src/lib.rs index 083363c95..fe1bcc3d2 100644 --- a/crates/index-scheduler/src/lib.rs +++ b/crates/index-scheduler/src/lib.rs @@ -802,7 +802,7 @@ impl IndexScheduler { if let Some(batch_uids) = batch_uids { let mut batch_tasks = RoaringBitmap::new(); for batch_uid in batch_uids { - if Some(*batch_uid) == processing_batch.as_ref().map(|batch| batch.uid) { + if processing_batch.as_ref().map_or(false, |batch| batch.uid == *batch_uid) { batch_tasks |= &processing_tasks; } else { batch_tasks |= self.tasks_in_batch(rtxn, *batch_uid)?;