summaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-26 02:02:32 +0000
committerBlaž Hrastnik2021-03-26 02:03:14 +0000
commitad3325db8e6dce3a10b9f8e0319ab9814c7ade1b (patch)
treeb855b4ca22fccb6eb97f011af3f26372d5c8df1c /helix-term/src/ui
parentcf0e191a6a42a2382128765dc0ff1531ad9800af (diff)
minor: Remove a few unwraps.
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/prompt.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/helix-term/src/ui/prompt.rs b/helix-term/src/ui/prompt.rs
index 8b3a1ca2..c61f0bd1 100644
--- a/helix-term/src/ui/prompt.rs
+++ b/helix-term/src/ui/prompt.rs
@@ -130,9 +130,7 @@ impl Prompt {
theme.get("ui.statusline"),
);
for (i, (_range, completion)) in self.completion.iter().enumerate() {
- let color = if self.completion_selection_index.is_some()
- && i == self.completion_selection_index.unwrap()
- {
+ let color = if Some(i) == self.completion_selection_index {
Style::default().bg(Color::Rgb(104, 60, 232))
} else {
text_color