mirror of
https://github.com/helix-editor/helix.git
synced 2024-11-22 09:26:19 +04:00
nit: remove a String allocation that is immediately used as an &str (#4277)
This commit is contained in:
parent
e80beaa7b0
commit
45e038f4d5
@ -105,7 +105,7 @@ pub fn score(&mut self, pattern: &str) {
|
||||
.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)
|
||||
|
Loading…
Reference in New Issue
Block a user