From 45e038f4d5be367388b451a5d182b5643c04621d Mon Sep 17 00:00:00 2001
From: Poliorcetics <poliorcetics@users.noreply.github.com>
Date: Sat, 15 Oct 2022 00:35:00 +0200
Subject: [PATCH] nit: remove a String allocation that is immediately used as
 an &str (#4277)

---
 helix-term/src/ui/menu.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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)