Skip to content

Commit

Permalink
nit: remove a String allocation that is immediately used as an &str (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
poliorcetics authored and Shekhinah Memmel committed Dec 11, 2022
1 parent 41b18af commit 795744b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion helix-term/src/ui/menu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl<T: Item> Menu<T> {
.iter()
.enumerate()
.filter_map(|(index, option)| {
let text: String = option.filter_text(&self.editor_data).into();
let text = option.filter_text(&self.editor_data);
// TODO: using fuzzy_indices could give us the char idx for match highlighting
self.matcher
.fuzzy_match(&text, pattern)
Expand Down

0 comments on commit 795744b

Please sign in to comment.