refactor: better variable naming

This commit is contained in:
Nikita Revenco 2024-12-19 15:53:34 +00:00
parent 565c981107
commit 22259e3a8c

View file

@ -94,9 +94,11 @@ impl menu::Item for CompletionItem {
return menu::Row::new([ return menu::Row::new([
first_cell, first_cell,
maybe_hex_color maybe_hex_color
.map_or(Span::raw("color"), |c| match Color::from_hex(c) { .map_or(Span::raw("color"), |hex_color| {
match Color::from_hex(hex_color) {
Ok(l) => Span::styled(" ", Style::default().bg(l)), Ok(l) => Span::styled(" ", Style::default().bg(l)),
Err(_) => Span::raw("color"), Err(_) => Span::raw("color"),
}
}) })
.into(), .into(),
]); ]);