Refactor line_to_word
Avoid taking ownership if not needed. Use idiomatic rust.
This commit is contained in:
parent
e02fb4fecd
commit
b552804b56
1 changed files with 2 additions and 5 deletions
|
@ -47,11 +47,8 @@ impl Iterator for Dictionary {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn line_to_word(l: String) -> String {
|
fn line_to_word(line: &str) -> String {
|
||||||
let l = unidecode(&l);
|
unidecode(&line.to_string()).to_lowercase().replace("'", "")
|
||||||
let l = l.to_lowercase();
|
|
||||||
let l = l.replace("'", "");
|
|
||||||
l
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// filtri {{{
|
// filtri {{{
|
||||||
|
|
Reference in a new issue