summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index ec6a930..20abbae 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -1850,15 +1850,7 @@ impl Config {
}
values.extend(complete_agent_variables(args[0]));
};
- let mut values_with_score: Vec<_> = values
- .into_iter()
- .filter_map(|v| {
- let score = fuzzy_match(&v.0, filter)?;
- Some((v, score))
- })
- .collect();
- values_with_score.sort_unstable_by(|a, b| b.1.cmp(&a.1));
- values_with_score.into_iter().map(|v| v.0).collect()
+ fuzzy_filter(values, |v| v.0.as_str(), filter)
}
pub fn sync_models_url(&self) -> String {