pull/997/head
Omnikar 3 years ago
parent ababd05d8b
commit 3d2e7ad429
No known key found for this signature in database
GPG Key ID: 7DE6694CDA7885ED

@ -239,10 +239,8 @@ pub mod completers {
let mut matches: Vec<_> = commands let mut matches: Vec<_> = commands
.into_iter() .into_iter()
.map(|name| ((0..), Cow::from(name))) .map(|name| Cow::from(name))
.filter_map(|(_range, name)| { .filter_map(|name| matcher.fuzzy_match(&name, input).map(|score| (name, score)))
matcher.fuzzy_match(&name, input).map(|score| (name, score))
})
.collect(); .collect();
matches.sort_unstable_by_key(|(_file, score)| Reverse(*score)); matches.sort_unstable_by_key(|(_file, score)| Reverse(*score));

Loading…
Cancel
Save