diff --git a/index-scheduler/src/utils.rs b/index-scheduler/src/utils.rs index 8c50e00c7..b3982c19a 100644 --- a/index-scheduler/src/utils.rs +++ b/index-scheduler/src/utils.rs @@ -509,13 +509,12 @@ impl IndexScheduler { match status { Status::Enqueued | Status::Processing => { assert!(self - .file_store - .all_uuids() - .unwrap() - .find(|uuid| uuid.as_ref().unwrap() == &content_file) - .is_some(), - "Could not find uuid `{content_file}` in the file_store. Available uuids are {:?}.", - self.file_store.all_uuids().unwrap().collect::>>(), + .file_store + .all_uuids() + .unwrap() + .any(|uuid| uuid.as_ref().unwrap() == &content_file), + "Could not find uuid `{content_file}` in the file_store. Available uuids are {:?}.", + self.file_store.all_uuids().unwrap().collect::>>().unwrap(), ); } Status::Succeeded | Status::Failed | Status::Canceled => { @@ -523,8 +522,7 @@ impl IndexScheduler { .file_store .all_uuids() .unwrap() - .find(|uuid| uuid.as_ref().unwrap() == &content_file) - .is_none()); + .all(|uuid| uuid.as_ref().unwrap() != &content_file)); } } }