Make rustfmt happy

This commit is contained in:
Clément Renault 2023-04-25 16:55:39 +02:00
parent cfd1b2cc97
commit 14293f6c8f
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4
2 changed files with 5 additions and 11 deletions

View File

@ -658,9 +658,7 @@ mod tests {
let dividers = [2, 3, 5, 7, 11, 6, 15, 35, 18, 14];
let parts_candidates: Vec<RoaringBitmap> = dividers
.iter()
.map(|&divider| {
(0..).map(|x| divider * x).take_while(|x| *x <= 210).collect()
})
.map(|&divider| (0..).map(|x| divider * x).take_while(|x| *x <= 210).collect())
.collect();
let combinations = create_disjoint_combinations(parts_candidates);
@ -688,9 +686,7 @@ mod tests {
];
let parts_candidates: Vec<RoaringBitmap> = dividers
.iter()
.map(|divider| {
(0..).map(|x| divider * x).take_while(|x| *x <= 100).collect()
})
.map(|divider| (0..).map(|x| divider * x).take_while(|x| *x <= 100).collect())
.collect();
let combinations = create_non_disjoint_combinations(parts_candidates.clone());

View File

@ -628,8 +628,7 @@ fn create_matching_words(
}
// create a CONSECUTIVE matchings words wrapping all word in the phrase
PrimitiveQueryPart::Phrase(words) => {
let ids: Vec<_> =
(0..words.len()).map(|i| id + i as PrimitiveWordId).collect();
let ids: Vec<_> = (0..words.len()).map(|i| id + i as PrimitiveWordId).collect();
// Require that all words of the phrase have a corresponding MatchingWord
// before adding any of them to the matching_words result
if let Some(phrase_matching_words) = words
@ -686,9 +685,8 @@ fn create_matching_words(
}
})
.collect();
let ids: Vec<_> = (0..words.len())
.map(|i| id + i as PrimitiveWordId)
.collect();
let ids: Vec<_> =
(0..words.len()).map(|i| id + i as PrimitiveWordId).collect();
if let Some(synonyms) = ctx.synonyms(&words)? {
for synonym in synonyms {