mirror of
https://github.com/solaeus/nucleo.git
synced 2024-12-22 09:57:49 +00:00
fix high leverl helper method
This commit is contained in:
parent
1aafe89a16
commit
ca9ffd9cb0
@ -332,10 +332,10 @@ pub fn fuzzy_match<T: AsRef<str>>(
|
|||||||
case_matching: CaseMatching,
|
case_matching: CaseMatching,
|
||||||
) -> Vec<(T, u32)> {
|
) -> Vec<(T, u32)> {
|
||||||
let mut pattern_ = Pattern::new(&matcher.config, case_matching);
|
let mut pattern_ = Pattern::new(&matcher.config, case_matching);
|
||||||
|
pattern_.set_literal(pattern, PatternKind::Fuzzy, false);
|
||||||
if pattern_.is_empty() {
|
if pattern_.is_empty() {
|
||||||
return items.into_iter().map(|item| (item, 0)).collect();
|
return items.into_iter().map(|item| (item, 0)).collect();
|
||||||
}
|
}
|
||||||
pattern_.set_literal(pattern, PatternKind::Fuzzy, false);
|
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
let mut items: Vec<_> = items
|
let mut items: Vec<_> = items
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
Loading…
Reference in New Issue
Block a user