From 70465aa5ce2a3640fdcc4f0dc8c9a025bd8e056b Mon Sep 17 00:00:00 2001 From: unvalley Date: Fri, 4 Nov 2022 08:59:58 +0900 Subject: [PATCH] Execute cargo fmt --- milli/src/search/criteria/mod.rs | 17 +++++++++++------ milli/src/search/query_tree.rs | 7 ++----- .../extract/extract_word_position_docids.rs | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/milli/src/search/criteria/mod.rs b/milli/src/search/criteria/mod.rs index d1c482b38..76718c8ec 100644 --- a/milli/src/search/criteria/mod.rs +++ b/milli/src/search/criteria/mod.rs @@ -431,12 +431,17 @@ pub fn resolve_phrase(ctx: &dyn Context, phrase: &[Option]) -> Result bitmaps.push(m), diff --git a/milli/src/search/query_tree.rs b/milli/src/search/query_tree.rs index 3237bb9d3..a9c1ac29f 100755 --- a/milli/src/search/query_tree.rs +++ b/milli/src/search/query_tree.rs @@ -589,11 +589,8 @@ fn create_matching_words( PrimitiveQueryPart::Phrase(words) => { let ids: Vec<_> = (0..words.len()).into_iter().map(|i| id + i as PrimitiveWordId).collect(); - let words = words - .into_iter() - .flatten() - .map(|w| MatchingWord::new(w, 0, false)) - .collect(); + let words = + words.into_iter().flatten().map(|w| MatchingWord::new(w, 0, false)).collect(); matching_words.push((words, ids)); } } diff --git a/milli/src/update/index_documents/extract/extract_word_position_docids.rs b/milli/src/update/index_documents/extract/extract_word_position_docids.rs index b7015d2ce..d95db4157 100644 --- a/milli/src/update/index_documents/extract/extract_word_position_docids.rs +++ b/milli/src/update/index_documents/extract/extract_word_position_docids.rs @@ -41,7 +41,7 @@ pub fn extract_word_position_docids( key_buffer.extend_from_slice(word_bytes); key_buffer.extend_from_slice(&position.to_be_bytes()); - word_position_docids_sorter.insert(&key_buffer,document_id.to_ne_bytes())?; + word_position_docids_sorter.insert(&key_buffer, document_id.to_ne_bytes())?; } }