Skip to content

Commit 28d7a1e

Browse files
poliorceticsthe-mikedavis
authored andcommitted
nit: remove a String allocation that is immediately used as an &str (helix-editor#4277)
1 parent a74e760 commit 28d7a1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helix-term/src/ui/menu.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -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)

0 commit comments

Comments
 (0)