Make clippy happy

This commit is contained in:
Clément Renault
2023-01-17 18:01:26 +01:00
parent 2b1f6a7f11
commit 1b78231e18
19 changed files with 115 additions and 139 deletions

View File

@ -7,15 +7,15 @@ fn set_stop_words(index: &Index, stop_words: &[&str]) {
let mut wtxn = index.write_txn().unwrap();
let config = IndexerConfig::default();
let mut builder = Settings::new(&mut wtxn, &index, &config);
let stop_words = stop_words.into_iter().map(|s| s.to_string()).collect();
let mut builder = Settings::new(&mut wtxn, index, &config);
let stop_words = stop_words.iter().map(|s| s.to_string()).collect();
builder.set_stop_words(stop_words);
builder.execute(|_| (), || false).unwrap();
wtxn.commit().unwrap();
}
fn test_phrase_search_with_stop_words_given_criteria(criteria: &[Criterion]) {
let index = super::setup_search_index_with_criteria(&criteria);
let index = super::setup_search_index_with_criteria(criteria);
// Add stop_words
set_stop_words(&index, &["a", "an", "the", "of"]);