From ca9ffd9cb017786bc8bc70dd9f627108c8333420 Mon Sep 17 00:00:00 2001 From: Pascal Kuthe Date: Sun, 6 Aug 2023 20:18:55 +0200 Subject: [PATCH] fix high leverl helper method --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c98ae9b..9d2725d 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -332,10 +332,10 @@ pub fn fuzzy_match>( case_matching: CaseMatching, ) -> Vec<(T, u32)> { let mut pattern_ = Pattern::new(&matcher.config, case_matching); + pattern_.set_literal(pattern, PatternKind::Fuzzy, false); if pattern_.is_empty() { return items.into_iter().map(|item| (item, 0)).collect(); } - pattern_.set_literal(pattern, PatternKind::Fuzzy, false); let mut buf = Vec::new(); let mut items: Vec<_> = items .into_iter()