From 8371819114b6384c50977bc366eb69ce24a528f5 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Mon, 14 Oct 2024 10:58:37 +0200 Subject: [PATCH] Some clippy related fixes --- milli/src/update/new/indexer/document_changes.rs | 2 +- milli/src/update/new/indexer/document_operation.rs | 4 ++-- milli/src/update/new/indexer/partial_dump.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/milli/src/update/new/indexer/document_changes.rs b/milli/src/update/new/indexer/document_changes.rs index 1dd0832f5..2967311df 100644 --- a/milli/src/update/new/indexer/document_changes.rs +++ b/milli/src/update/new/indexer/document_changes.rs @@ -278,7 +278,7 @@ pub trait Extractor<'extractor>: Sync { pub trait DocumentChanges<'pl // lifetime of the underlying payload >: Sync { - type Item; + type Item: Send; fn iter(&self) -> impl IndexedParallelIterator; diff --git a/milli/src/update/new/indexer/document_operation.rs b/milli/src/update/new/indexer/document_operation.rs index 7978fc46c..3fb592574 100644 --- a/milli/src/update/new/indexer/document_operation.rs +++ b/milli/src/update/new/indexer/document_operation.rs @@ -131,7 +131,7 @@ impl<'pl> DocumentOperation<'pl> { None => { let (docid, is_new) = match index .external_documents_ids() - .get(rtxn, &external_document_id)? + .get(rtxn, external_document_id)? { Some(docid) => (docid, false), None => ( @@ -401,7 +401,7 @@ impl MergeChanges for MergeDocumentForUpdates { let versions = versions.into_bump_slice(); let versions = match versions { - [single] => Versions::Single(*single), + [single] => Versions::Single(single), versions => Versions::Multiple(versions), }; diff --git a/milli/src/update/new/indexer/partial_dump.rs b/milli/src/update/new/indexer/partial_dump.rs index 527f5c751..66a7d7fc8 100644 --- a/milli/src/update/new/indexer/partial_dump.rs +++ b/milli/src/update/new/indexer/partial_dump.rs @@ -67,7 +67,7 @@ where let fields_ids_map = fields_ids_map.deref_mut(); let res = document - .deserialize_map(DocumentVisitor::new(fields_ids_map, self.primary_key, &doc_alloc)) + .deserialize_map(DocumentVisitor::new(fields_ids_map, self.primary_key, doc_alloc)) .map_err(UserError::SerdeJson)?; let external_document_id = match res {