diff --git a/src/main.rs b/src/main.rs index 02bfbeb..9c771f2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -8,10 +8,8 @@ fn memorised_words(word_counts: Vec>, ranges: Vec<&str>) -> for word_count in word_counts { for &range in &ranges { match word_count.get(range) { - Some(length) => { - total_memorised += length - }, - None => {}, + Some(length) => total_memorised += length, + None => {} } } } @@ -21,8 +19,8 @@ fn memorised_words(word_counts: Vec>, ranges: Vec<&str>) -> fn main() { let file_data = fs::read_to_string("data.json").expect("Unable to read file"); - let word_counts: Vec> = serde_json::from_str(&file_data).expect("Could not parse JSON data"); - + let word_counts: Vec> = + serde_json::from_str(&file_data).expect("Could not parse JSON data"); // Read input from standard input let mut input = String::new();