From 6037eebfdc9dd9c44e5401deac52cc0be658ea90 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Tue, 27 Jul 2021 14:28:16 -0500 Subject: [PATCH] style: Clippy --- crates/typos-dict/verify/src/main.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/crates/typos-dict/verify/src/main.rs b/crates/typos-dict/verify/src/main.rs index 7d9dc7e..bd374e7 100644 --- a/crates/typos-dict/verify/src/main.rs +++ b/crates/typos-dict/verify/src/main.rs @@ -20,13 +20,11 @@ fn generate(file: &mut W, dict: &[u8]) { let mut typo = i.next().expect("typo").to_owned(); typo.make_ascii_lowercase(); let typo = UniCase::new(typo); - rows.entry(typo) - .or_insert_with(|| Vec::new()) - .extend(i.map(|c| { - let mut c = c.to_owned(); - c.make_ascii_lowercase(); - c - })); + rows.entry(typo).or_insert_with(Vec::new).extend(i.map(|c| { + let mut c = c.to_owned(); + c.make_ascii_lowercase(); + c + })); }); let disallowed_typos = varcon_words();