style: remove clippy warnings

pull/243/head
Florian Dehau 4 years ago
parent ae677099d6
commit 278c153d31

@ -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);
}
}
}

@ -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

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

Loading…
Cancel
Save