on master help sign in
nit: remove a String allocation that is immediately used as an &str (#4277)
commit45e038f4d5be367388b451a5d182b5643c04621d authorPoliorcetics <poliorcetics@users.noreply.github.com> dateSat 15 Oct 2022, 00:35 (4 years ago) parente80beaa
1 file changed+1−1
helix-term/src/ui/menu.rs+1−1
helix-term/src/ui/menu.rs+1−1
@@ -105,7 +105,7 @@ impl<T: Item> Menu<T> {
105105 .iter()
106106 .enumerate()
107107 .filter_map(|(index, option)| {
108− let text: String = option.filter_text(&self.editor_data).into();
108+ let text = option.filter_text(&self.editor_data);
109109 // TODO: using fuzzy_indices could give us the char idx for match highlighting
110110 self.matcher
111111 .fuzzy_match(&text, pattern)