style: fix clippy warnings

pull/210/head
Florian Dehau 4 years ago
parent 6e24f9d47b
commit d16db5ed90

@ -93,7 +93,7 @@ where
map_error(queue!( map_error(queue!(
self.buffer, self.buffer,
Print(string.clone()), Print(string),
SetForegroundColor(CColor::Reset), SetForegroundColor(CColor::Reset),
SetBackgroundColor(CColor::Reset), SetBackgroundColor(CColor::Reset),
SetAttribute(CAttribute::Reset) SetAttribute(CAttribute::Reset)

@ -297,16 +297,14 @@ where
/// ``` /// ```
/// # use tui::widgets::Chart; /// # use tui::widgets::Chart;
/// # use tui::layout::Constraint; /// # use tui::layout::Constraint;
/// # fn main() { /// let constraints = (
/// let constraints = ( /// Constraint::Ratio(1, 3),
/// Constraint::Ratio(1, 3), /// Constraint::Ratio(1, 4)
/// Constraint::Ratio(1, 4) /// );
/// ); /// // Hide the legend when either its width is greater than 33% of the total widget width
/// // Hide the legend when either its width is greater than 33% of the total widget width /// // or if its height is greater than 25% of the total widget height.
/// // or if its height is greater than 25% of the total widget height. /// let _chart: Chart<String, String> = Chart::default()
/// let _chart: Chart<String, String> = Chart::default() /// .hidden_legend_constraints(constraints);
/// .hidden_legend_constraints(constraints);
/// # }
pub fn hidden_legend_constraints( pub fn hidden_legend_constraints(
mut self, mut self,
constraints: (Constraint, Constraint), constraints: (Constraint, Constraint),

@ -22,7 +22,7 @@ fn gauge_render() {
.render(&mut f, chunks[0]); .render(&mut f, chunks[0]);
Gauge::default() Gauge::default()
.block(Block::default().title("Ratio").borders(Borders::ALL)) .block(Block::default().title("Ratio").borders(Borders::ALL))
.ratio(0.2113139343131) .ratio(0.211_313_934_313_1)
.render(&mut f, chunks[1]); .render(&mut f, chunks[1]);
}) })
.unwrap(); .unwrap();

Loading…
Cancel
Save