mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-02-16 23:43:27 +01:00
Make rustfmt happy
This commit is contained in:
parent
cfd1b2cc97
commit
14293f6c8f
@ -658,9 +658,7 @@ mod tests {
|
|||||||
let dividers = [2, 3, 5, 7, 11, 6, 15, 35, 18, 14];
|
let dividers = [2, 3, 5, 7, 11, 6, 15, 35, 18, 14];
|
||||||
let parts_candidates: Vec<RoaringBitmap> = dividers
|
let parts_candidates: Vec<RoaringBitmap> = dividers
|
||||||
.iter()
|
.iter()
|
||||||
.map(|÷r| {
|
.map(|÷r| (0..).map(|x| divider * x).take_while(|x| *x <= 210).collect())
|
||||||
(0..).map(|x| divider * x).take_while(|x| *x <= 210).collect()
|
|
||||||
})
|
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let combinations = create_disjoint_combinations(parts_candidates);
|
let combinations = create_disjoint_combinations(parts_candidates);
|
||||||
@ -688,9 +686,7 @@ mod tests {
|
|||||||
];
|
];
|
||||||
let parts_candidates: Vec<RoaringBitmap> = dividers
|
let parts_candidates: Vec<RoaringBitmap> = dividers
|
||||||
.iter()
|
.iter()
|
||||||
.map(|divider| {
|
.map(|divider| (0..).map(|x| divider * x).take_while(|x| *x <= 100).collect())
|
||||||
(0..).map(|x| divider * x).take_while(|x| *x <= 100).collect()
|
|
||||||
})
|
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let combinations = create_non_disjoint_combinations(parts_candidates.clone());
|
let combinations = create_non_disjoint_combinations(parts_candidates.clone());
|
||||||
|
@ -628,8 +628,7 @@ fn create_matching_words(
|
|||||||
}
|
}
|
||||||
// create a CONSECUTIVE matchings words wrapping all word in the phrase
|
// create a CONSECUTIVE matchings words wrapping all word in the phrase
|
||||||
PrimitiveQueryPart::Phrase(words) => {
|
PrimitiveQueryPart::Phrase(words) => {
|
||||||
let ids: Vec<_> =
|
let ids: Vec<_> = (0..words.len()).map(|i| id + i as PrimitiveWordId).collect();
|
||||||
(0..words.len()).map(|i| id + i as PrimitiveWordId).collect();
|
|
||||||
// Require that all words of the phrase have a corresponding MatchingWord
|
// Require that all words of the phrase have a corresponding MatchingWord
|
||||||
// before adding any of them to the matching_words result
|
// before adding any of them to the matching_words result
|
||||||
if let Some(phrase_matching_words) = words
|
if let Some(phrase_matching_words) = words
|
||||||
@ -686,9 +685,8 @@ fn create_matching_words(
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
let ids: Vec<_> = (0..words.len())
|
let ids: Vec<_> =
|
||||||
.map(|i| id + i as PrimitiveWordId)
|
(0..words.len()).map(|i| id + i as PrimitiveWordId).collect();
|
||||||
.collect();
|
|
||||||
|
|
||||||
if let Some(synonyms) = ctx.synonyms(&words)? {
|
if let Some(synonyms) = ctx.synonyms(&words)? {
|
||||||
for synonym in synonyms {
|
for synonym in synonyms {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user