style: remove clippy warnings

This commit is contained in:
Florian Dehau 2020-03-13 01:12:14 +01:00
parent ae677099d6
commit 278c153d31
3 changed files with 4 additions and 8 deletions

View file

@ -48,12 +48,10 @@ impl Shape for Line {
} else {
draw_line_low(painter, x1, y1, x2, y2, self.color);
}
} else if y1 > y2 {
draw_line_high(painter, x2, y2, x1, y1, self.color);
} else {
if y1 > y2 {
draw_line_high(painter, x2, y2, x1, y1, self.color);
} else {
draw_line_high(painter, x1, y1, x2, y2, self.color);
}
draw_line_high(painter, x1, y1, x2, y2, self.color);
}
}
}

View file

@ -41,14 +41,12 @@ impl ListState {
/// ```
/// # use tui::widgets::{Block, Borders, List, Text};
/// # use tui::style::{Style, Color, Modifier};
/// # fn main() {
/// let items = ["Item 1", "Item 2", "Item 3"].iter().map(|i| Text::raw(*i));
/// List::new(items)
/// .block(Block::default().title("List").borders(Borders::ALL))
/// .style(Style::default().fg(Color::White))
/// .highlight_style(Style::default().modifier(Modifier::ITALIC))
/// .highlight_symbol(">>");
/// # }
/// ```
pub struct List<'b, L>
where

View file

@ -131,7 +131,7 @@ where
Table {
block: None,
style: Style::default(),
header: header.into_iter(),
header,
header_style: Style::default(),
widths: &[],
column_spacing: 1,