mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-26 14:40:30 +00:00
style: remove clippy warnings
This commit is contained in:
parent
ae677099d6
commit
278c153d31
3 changed files with 4 additions and 8 deletions
|
@ -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…
Reference in a new issue