From a3bf84ade60f4a573db910e1d815e93f7f41e524 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 7 Aug 2023 16:23:36 -0500 Subject: [PATCH] chore(dict): Don't clear disallowed words --- crates/typos-dict/tests/verify.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/crates/typos-dict/tests/verify.rs b/crates/typos-dict/tests/verify.rs index 24f63bc..560b095 100644 --- a/crates/typos-dict/tests/verify.rs +++ b/crates/typos-dict/tests/verify.rs @@ -81,13 +81,9 @@ fn process>( let rows: Dict = dict .into_iter() .filter(|(t, _)| is_word(t)) - .filter_map(|(t, c)| { + .map(|(t, c)| { let new_c: IndexSet<_> = c.into_iter().filter(|c| is_word(c)).collect(); - if new_c.is_empty() { - None - } else { - Some((t, new_c)) - } + (t, new_c) }) .collect();