From ad3325db8e6dce3a10b9f8e0319ab9814c7ade1b Mon Sep 17 00:00:00 2001 From: Blaž Hrastnik Date: Fri, 26 Mar 2021 11:02:32 +0900 Subject: minor: Remove a few unwraps. --- helix-term/src/ui/prompt.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'helix-term/src/ui') 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 -- cgit v1.2.3-70-g09d2