refactor: replace String with &str in function parameters (codeberg #9)

Reviewed-on: https://codeberg.org/iff/pay-respects/pulls/9
Co-authored-by: Integral <integral@member.fsf.org>
Co-committed-by: Integral <integral@member.fsf.org>
This commit is contained in:
Integral 2024-12-14 17:45:19 +00:00 committed by iff
parent 9728ce48a6
commit aae2ce09f0
3 changed files with 11 additions and 13 deletions

View file

@ -101,7 +101,7 @@ pub fn suggest_typo(typos: &[String], candidates: &[String], executables: &[Stri
unreachable!("suggest_typo: must have at least two candidates")
}
}
} else if let Some(suggest) = find_similar(typo, &candidates, Some(2)) {
} else if let Some(suggest) = find_similar(typo, candidates, Some(2)) {
suggestions.push(suggest);
} else {
suggestions.push(typo.to_string());