mirror of
https://github.com/danog/ytop.git
synced 2024-11-26 12:04:50 +01:00
make cargo clippy happy
This commit is contained in:
parent
c93c4fb7e7
commit
36858713e2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user