aboutsummaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorPoliorcetics2022-10-14 22:35:00 +0000
committerGitHub2022-10-14 22:35:00 +0000
commit45e038f4d5be367388b451a5d182b5643c04621d (patch)
treea15b6948efdc1595f9069fd5522ec4c49ed5d063 /helix-term/src/ui
parente80beaa7b09a9852c17563b31fc8b10df2a7742f (diff)
nit: remove a String allocation that is immediately used as an &str (#4277)
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/menu.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-term/src/ui/menu.rs b/helix-term/src/ui/menu.rs
index 1d247b1a..f77f5e80 100644
--- a/helix-term/src/ui/menu.rs
+++ b/helix-term/src/ui/menu.rs
@@ -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)