Automatic fix from rls
This commit is contained in:
parent
6ea12cfc46
commit
ded6795623
1 changed files with 9 additions and 6 deletions
15
src/main.rs
15
src/main.rs
|
@ -1,12 +1,12 @@
|
|||
use std::env;
|
||||
use std::iter::Iterator;
|
||||
use std::io::Error;
|
||||
use std::io::BufReader;
|
||||
use std::io::BufRead;
|
||||
use std::fs::File;
|
||||
use std::io::BufRead;
|
||||
use std::io::BufReader;
|
||||
use std::io::Error;
|
||||
use std::iter::Iterator;
|
||||
|
||||
use unidecode::unidecode;
|
||||
use regex::Regex;
|
||||
use unidecode::unidecode;
|
||||
|
||||
#[derive(Default)]
|
||||
struct Dictionary {
|
||||
|
@ -40,7 +40,10 @@ fn dictionary_from_iterable(lines: impl Iterator<Item = Result<String, Error>>)
|
|||
// TODO: normalizza: lascia solo a-z, converti gli accenti, ecc.
|
||||
w.push(line_to_word(line))
|
||||
}
|
||||
return Dictionary{words: w, ..Dictionary::default()};
|
||||
return Dictionary {
|
||||
words: w,
|
||||
..Dictionary::default()
|
||||
};
|
||||
}
|
||||
|
||||
fn line_to_word(l: String) -> String {
|
||||
|
|
Reference in a new issue