mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-03 11:57:07 +02:00
remove a lot of unecessary clone and ref
This commit is contained in:
parent
4d25c159e6
commit
7e52f1effb
5 changed files with 32 additions and 32 deletions
|
@ -269,16 +269,16 @@ impl IndexScheduler {
|
|||
must_stop_processing: self.must_stop_processing.clone(),
|
||||
processing_tasks: self.processing_tasks.clone(),
|
||||
file_store: self.file_store.clone(),
|
||||
all_tasks: self.all_tasks.clone(),
|
||||
status: self.status.clone(),
|
||||
kind: self.kind.clone(),
|
||||
index_tasks: self.index_tasks.clone(),
|
||||
enqueued_at: self.enqueued_at.clone(),
|
||||
started_at: self.started_at.clone(),
|
||||
finished_at: self.finished_at.clone(),
|
||||
all_tasks: self.all_tasks,
|
||||
status: self.status,
|
||||
kind: self.kind,
|
||||
index_tasks: self.index_tasks,
|
||||
enqueued_at: self.enqueued_at,
|
||||
started_at: self.started_at,
|
||||
finished_at: self.finished_at,
|
||||
index_mapper: self.index_mapper.clone(),
|
||||
wake_up: self.wake_up.clone(),
|
||||
autobatching_enabled: self.autobatching_enabled.clone(),
|
||||
autobatching_enabled: self.autobatching_enabled,
|
||||
dumps_path: self.dumps_path.clone(),
|
||||
#[cfg(test)]
|
||||
test_breakpoint_sdr: self.test_breakpoint_sdr.clone(),
|
||||
|
@ -808,7 +808,7 @@ impl IndexScheduler {
|
|||
let res = {
|
||||
let cloned_index_scheduler = self.private_clone();
|
||||
let handle = std::thread::spawn(move || cloned_index_scheduler.process_batch(batch));
|
||||
handle.join().unwrap_or_else(|_| Err(Error::ProcessBatchPanicked))
|
||||
handle.join().unwrap_or(Err(Error::ProcessBatchPanicked))
|
||||
};
|
||||
|
||||
#[cfg(test)]
|
||||
|
@ -1223,7 +1223,7 @@ mod tests {
|
|||
index_scheduler
|
||||
.register(KindWithContent::TaskDeletion {
|
||||
query: "test_query".to_owned(),
|
||||
tasks: RoaringBitmap::from_iter(&[0, 1]),
|
||||
tasks: RoaringBitmap::from_iter([0, 1]),
|
||||
})
|
||||
.unwrap();
|
||||
index_scheduler.assert_internally_consistent();
|
||||
|
@ -1279,7 +1279,7 @@ mod tests {
|
|||
index_scheduler
|
||||
.register(KindWithContent::TaskDeletion {
|
||||
query: "test_query".to_owned(),
|
||||
tasks: RoaringBitmap::from_iter(&[0]),
|
||||
tasks: RoaringBitmap::from_iter([0]),
|
||||
})
|
||||
.unwrap();
|
||||
index_scheduler.assert_internally_consistent();
|
||||
|
@ -1322,7 +1322,7 @@ mod tests {
|
|||
index_scheduler
|
||||
.register(KindWithContent::TaskDeletion {
|
||||
query: "test_query".to_owned(),
|
||||
tasks: RoaringBitmap::from_iter(&[0]),
|
||||
tasks: RoaringBitmap::from_iter([0]),
|
||||
})
|
||||
.unwrap();
|
||||
index_scheduler.assert_internally_consistent();
|
||||
|
|
|
@ -436,7 +436,7 @@ impl IndexScheduler {
|
|||
}
|
||||
Details::Dump { dump_uid: d1 } => {
|
||||
assert!(
|
||||
matches!(&kind, KindWithContent::DumpExport { dump_uid: d2, keys: _, instance_uid: _ } if &d1 == d2 )
|
||||
matches!(&kind, KindWithContent::DumpCreation { dump_uid: d2, keys: _, instance_uid: _ } if &d1 == d2 )
|
||||
);
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue