From 35f53c0b241ca8682c0b5213928792d3f37d32d8 Mon Sep 17 00:00:00 2001 From: amtoine Date: Sat, 17 Feb 2024 13:15:09 +0100 Subject: [PATCH] make Clippy happy --- src/ui.rs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/ui.rs b/src/ui.rs index 349ee05..ea2ee10 100644 --- a/src/ui.rs +++ b/src/ui.rs @@ -279,16 +279,14 @@ fn render_data(frame: &mut Frame<'_, B>, app: &App, config: &Config) crate::nu::value::Table::IsTable => unreachable!(), }; - if msg.is_some() { + if let Some(msg) = msg { data_frame_height -= 1; frame.render_widget( - Paragraph::new(msg.unwrap()) - .alignment(Alignment::Right) - .style( - Style::default() - .bg(config.colors.warning.background) - .fg(config.colors.warning.foreground), - ), + Paragraph::new(msg).alignment(Alignment::Right).style( + Style::default() + .bg(config.colors.warning.background) + .fg(config.colors.warning.foreground), + ), Rect::new(0, data_frame_height, frame.size().width, 1), ); }