mirror of
https://github.com/TECHNOFAB11/pay-respects.git
synced 2025-12-12 14:30:10 +01:00
chore: cleanup
This commit is contained in:
parent
f1f7ed8dbe
commit
171b3d4607
5 changed files with 26 additions and 23 deletions
|
|
@ -167,7 +167,7 @@ pub fn suggest_typo(typos: &[String], candidates: Vec<String>) -> String {
|
|||
suggestions.join(" ")
|
||||
}
|
||||
|
||||
pub fn find_similar(typo: &str, candidates: &Vec<String>) -> Option<String> {
|
||||
pub fn find_similar(typo: &str, candidates: &[String]) -> Option<String> {
|
||||
let mut min_distance = 10;
|
||||
let mut min_distance_index = None;
|
||||
for (i, candidate) in candidates.iter().enumerate() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue