From ded6795623f0eade9cb4998013c558c519e6b490 Mon Sep 17 00:00:00 2001 From: Blallo Date: Mon, 18 May 2020 16:43:50 +0200 Subject: [PATCH] Automatic fix from rls --- src/main.rs | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1a63730..f58a36a 100644 --- a/src/main.rs +++ b/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>) // 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 {