Skip to content

Commit

Permalink
make Clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
amtoine committed Feb 17, 2024
1 parent 0fefc77 commit 35f53c0
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,16 +279,14 @@ fn render_data<B: Backend>(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),
);
}
Expand Down

0 comments on commit 35f53c0

Please sign in to comment.