summaryrefslogtreecommitdiff
path: root/helix-term/src/ui/completion.rs
diff options
context:
space:
mode:
Diffstat (limited to 'helix-term/src/ui/completion.rs')
-rw-r--r--helix-term/src/ui/completion.rs5
1 files changed, 1 insertions, 4 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs
index f79c2235..0af03d14 100644
--- a/helix-term/src/ui/completion.rs
+++ b/helix-term/src/ui/completion.rs
@@ -19,10 +19,7 @@ use lsp::CompletionItem;
impl menu::Item for CompletionItem {
fn filter_text(&self) -> &str {
- self.filter_text
- .as_ref()
- .unwrap_or_else(|| &self.label)
- .as_str()
+ self.filter_text.as_ref().unwrap_or(&self.label).as_str()
}
fn label(&self) -> &str {