From aed0f8d1f83aaf4ed551b47bd05c9ac0f102d7a8 Mon Sep 17 00:00:00 2001 From: Nikita Revenco <154856872+NikitaRevenco@users.noreply.github.com> Date: Thu, 19 Dec 2024 17:32:06 +0000 Subject: [PATCH] refactor: remove extra variable assignment --- helix-term/src/ui/completion.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/helix-term/src/ui/completion.rs b/helix-term/src/ui/completion.rs index 8b341afb..e969ef1c 100644 --- a/helix-term/src/ui/completion.rs +++ b/helix-term/src/ui/completion.rs @@ -109,9 +109,7 @@ impl menu::Item for CompletionItem { }; maybe_hex_color.map_or(Span::raw("color"), |hex| { - let maybe_color = Color::from_hex(hex); - - match maybe_color { + match Color::from_hex(hex) { Some(color) => Span::styled("■", Style::default().fg(color)), // there is documentation but it doesn't conform to the format to parse the hex color None => Span::raw("color"),