Fixes for clippy bringing us down to 18 remaining issues.

This brings us a step closer to enforcing clippy on each build.
This commit is contained in:
Ewan Higgs
2022-10-24 21:34:13 +02:00
parent 004c09a8e2
commit 6b2fe94192
26 changed files with 117 additions and 131 deletions

View File

@ -69,7 +69,7 @@ impl<'t> Criterion for Typo<'t> {
let fst = self.ctx.words_fst();
let new_query_tree = match self.typos {
typos if typos < MAX_TYPOS_PER_WORD => alterate_query_tree(
&fst,
fst,
query_tree.clone(),
self.typos,
params.wdcache,
@ -78,7 +78,7 @@ impl<'t> Criterion for Typo<'t> {
// When typos >= MAX_TYPOS_PER_WORD, no more alteration of the query tree is possible,
// we keep the altered query tree
*query_tree = alterate_query_tree(
&fst,
fst,
query_tree.clone(),
self.typos,
params.wdcache,
@ -199,7 +199,7 @@ fn alterate_query_tree(
ops.iter_mut().try_for_each(|op| recurse(words_fst, op, number_typos, wdcache))
}
// Because Phrases don't allow typos, no alteration can be done.
Phrase(_words) => return Ok(()),
Phrase(_words) => Ok(()),
Operation::Query(q) => {
if let QueryKind::Tolerant { typo, word } = &q.kind {
// if no typo is allowed we don't call word_derivations function,