refactor: simplify iterator usage (#3017)

This commit is contained in:
Marcin Puc
2021-09-02 17:48:29 +02:00
committed by GitHub
parent 3933553486
commit 6598275e15
9 changed files with 21 additions and 26 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ impl<'a> ModuleConfig<'a> for StarshipRootConfig<'a> {
"env_var",
]
.iter()
.chain(ALL_MODULES.iter())
.chain(ALL_MODULES)
.filter_map(|field| {
let score = strsim::jaro_winkler(unknown, field);
(score > 0.8).then(|| (score, field))