1
0
mirror of https://github.com/danog/ytop.git synced 2024-11-26 20:15:03 +01:00

make cargo clippy happy

This commit is contained in:
Richard Patel 2020-04-23 08:20:06 +02:00
parent c93c4fb7e7
commit 36858713e2
No known key found for this signature in database
GPG Key ID: 77A6A8A1CF8D1762

View File

@ -13,13 +13,11 @@ use tui::widgets::{Block, Widget};
/// ```
/// # use tui::widgets::{Block, Borders, Sparkline};
/// # use tui::style::{Style, Color};
/// # fn main() {
/// Sparkline::default()
/// .block(Block::default().title("Sparkline").borders(Borders::ALL))
/// .data(&[0, 2, 3, 4, 1, 4, 10])
/// .max(5)
/// .style(Style::default().fg(Color::Red).bg(Color::White));
/// # }
/// ```
pub struct Sparkline<'a> {
/// A block to wrap the widget in
@ -56,12 +54,6 @@ impl<'a> Default for Sparkline<'a> {
}
impl<'a> Sparkline<'a> {
#[allow(clippy::all)]
pub fn block(mut self, block: Block<'a>) -> Sparkline<'a> {
self.block = Some(block);
self
}
pub fn style(mut self, style: Style) -> Sparkline<'a> {
self.style = style;
self