on master help sign in
nit: remove a String allocation that is immediately used as an &str (#4277)
45e038fPoliorcetics
helix-term/src/ui/menu.rs+1−1
@@ -105,7 +105,7 @@ impl<T: Item> Menu<T> {
105 .iter()
105 .iter()
106 .enumerate()
106 .enumerate()
107 .filter_map(|(index, option)| {
107 .filter_map(|(index, option)| {
108− let text: String = option.filter_text(&self.editor_data).into();
108+ let text = option.filter_text(&self.editor_data);
109 // TODO: using fuzzy_indices could give us the char idx for match highlighting
109 // TODO: using fuzzy_indices could give us the char idx for match highlighting
110 self.matcher
110 self.matcher
111 .fuzzy_match(&text, pattern)
111 .fuzzy_match(&text, pattern)