nit: remove a String allocation that is immediately used as an &str (#4277)

pull/4287/head
Poliorcetics 2022-10-15 00:35:00 +02:00 committed by GitHub
parent e80beaa7b0
commit 45e038f4d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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)