mirror of
https://github.com/crate-ci/typos.git
synced 2024-11-26 02:51:08 -05:00
chore(dict): Don't clear disallowed words
This commit is contained in:
parent
41ce6be897
commit
a3bf84ade6
1 changed files with 2 additions and 6 deletions
|
@ -81,13 +81,9 @@ fn process<S: Into<String>>(
|
||||||
let rows: Dict = dict
|
let rows: Dict = dict
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.filter(|(t, _)| is_word(t))
|
.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();
|
let new_c: IndexSet<_> = c.into_iter().filter(|c| is_word(c)).collect();
|
||||||
if new_c.is_empty() {
|
(t, new_c)
|
||||||
None
|
|
||||||
} else {
|
|
||||||
Some((t, new_c))
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue