diff options
author | Gokul Soumya | 2022-12-25 05:54:09 +0000 |
---|---|---|
committer | Blaž Hrastnik | 2023-01-18 05:19:32 +0000 |
commit | 5c7db7aed54f52b3af6102517f81c9d70bb6d1fb (patch) | |
tree | a49faaa0ceb633c09b908bfe249d2f9b4a935680 /helix-term/src/ui/completion.rs | |
parent | b2837ff3bea286ce7ccfba9b6fbcd861977caf83 (diff) |
Replace menu::Item::{row, label} with format()
Diffstat (limited to 'helix-term/src/ui/completion.rs')
-rw-r--r-- | helix-term/src/ui/completion.rs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index 11d7886a..824bafd8 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -1,7 +1,6 @@ use crate::compositor::{Component, Context, Event, EventResult}; use helix_view::{apply_transaction, editor::CompleteAction, ViewId}; use tui::buffer::Buffer as Surface; -use tui::text::Spans; use std::borrow::Cow; @@ -33,11 +32,7 @@ impl menu::Item for CompletionItem { .into() } - fn label(&self, _data: &Self::Data) -> Spans { - self.label.as_str().into() - } - - fn row(&self, _data: &Self::Data) -> menu::Row { + fn format(&self, _data: &Self::Data) -> menu::Row { menu::Row::new(vec![ menu::Cell::from(self.label.as_str()), menu::Cell::from(match self.kind { |