mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-07-28 17:21:03 +00:00
Fix clippy errors
Add clippy job Add clippy job to CI
This commit is contained in:
@ -432,18 +432,10 @@ pub fn resolve_phrase(ctx: &dyn Context, phrase: &[Option<String>]) -> Result<Ro
|
||||
// Get all the documents with the matching distance for each word pairs.
|
||||
let mut bitmaps = Vec::with_capacity(winsize.pow(2));
|
||||
for (offset, s1) in win.iter().enumerate().filter_map(|(index, word)| {
|
||||
if let Some(word) = word {
|
||||
Some((index, word))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
word.as_ref().map(|word| (index, word))
|
||||
}) {
|
||||
for (dist, s2) in win.iter().skip(offset + 1).enumerate().filter_map(|(index, word)| {
|
||||
if let Some(word) = word {
|
||||
Some((index, word))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
word.as_ref().map(|word| (index, word))
|
||||
}) {
|
||||
if dist == 0 {
|
||||
match ctx.word_pair_proximity_docids(s1, s2, 1)? {
|
||||
|
@ -488,7 +488,7 @@ fn resolve_plane_sweep_candidates(
|
||||
}
|
||||
// make a consecutive plane-sweep on the subgroup of words.
|
||||
let mut subgroup = Vec::with_capacity(words.len());
|
||||
for word in words.into_iter().map(|w| w.as_deref().unwrap()) {
|
||||
for word in words.iter().map(|w| w.as_deref().unwrap()) {
|
||||
match words_positions.get(word) {
|
||||
Some(positions) => {
|
||||
subgroup.push(positions.iter().map(|p| (p, 0, p)).collect())
|
||||
|
Reference in New Issue
Block a user