mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
Fix Clippy warnings
This commit is contained in:
parent
3ee7682fa7
commit
9f9ad4cc05
6 changed files with 12 additions and 12 deletions
|
@ -751,7 +751,7 @@ mod tests {
|
|||
let mut rng = rand::rngs::SmallRng::from_seed([0; 32]);
|
||||
keys.shuffle(&mut rng);
|
||||
|
||||
for (_i, key) in keys.into_iter().enumerate() {
|
||||
for key in keys {
|
||||
let mut bitmap = RoaringBitmap::new();
|
||||
bitmap.insert(key);
|
||||
index.insert(&mut txn, 0, &(key as f64), &bitmap);
|
||||
|
@ -770,7 +770,7 @@ mod tests {
|
|||
let mut rng = rand::rngs::SmallRng::from_seed([0; 32]);
|
||||
keys.shuffle(&mut rng);
|
||||
|
||||
for (_i, key) in keys.into_iter().enumerate() {
|
||||
for key in keys {
|
||||
let mut bitmap = RoaringBitmap::new();
|
||||
bitmap.insert(key);
|
||||
bitmap.insert(rng.gen_range(256..512));
|
||||
|
|
|
@ -77,7 +77,7 @@ pub fn extract_word_pair_proximity_docids<R: io::Read + io::Seek>(
|
|||
if let Some(deletion) = KvReaderDelAdd::new(value).get(DelAdd::Deletion) {
|
||||
for (position, word) in KvReaderU16::new(deletion).iter() {
|
||||
// drain the proximity window until the head word is considered close to the word we are inserting.
|
||||
while del_word_positions.get(0).map_or(false, |(_w, p)| {
|
||||
while del_word_positions.front().map_or(false, |(_w, p)| {
|
||||
index_proximity(*p as u32, position as u32) >= MAX_DISTANCE
|
||||
}) {
|
||||
word_positions_into_word_pair_proximity(
|
||||
|
@ -106,7 +106,7 @@ pub fn extract_word_pair_proximity_docids<R: io::Read + io::Seek>(
|
|||
if let Some(addition) = KvReaderDelAdd::new(value).get(DelAdd::Addition) {
|
||||
for (position, word) in KvReaderU16::new(addition).iter() {
|
||||
// drain the proximity window until the head word is considered close to the word we are inserting.
|
||||
while add_word_positions.get(0).map_or(false, |(_w, p)| {
|
||||
while add_word_positions.front().map_or(false, |(_w, p)| {
|
||||
index_proximity(*p as u32, position as u32) >= MAX_DISTANCE
|
||||
}) {
|
||||
word_positions_into_word_pair_proximity(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue