mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-13 16:26:26 +00:00
Make clippy happy
This commit is contained in:
@ -309,8 +309,7 @@ fn tokens_from_document<'a>(
|
||||
// if a language has been detected for the token, we update the counter.
|
||||
if let Some(language) = token.language {
|
||||
let script = token.script;
|
||||
let entry =
|
||||
script_language_word_count.entry(script).or_insert_with(Vec::new);
|
||||
let entry = script_language_word_count.entry(script).or_default();
|
||||
match entry.iter_mut().find(|(l, _)| *l == language) {
|
||||
Some((_, n)) => *n += 1,
|
||||
None => entry.push((language, 1)),
|
||||
|
Reference in New Issue
Block a user