style: fix clippy warnings

This commit is contained in:
Florian Dehau 2020-02-23 15:46:46 +01:00
parent 6e24f9d47b
commit d16db5ed90
3 changed files with 10 additions and 12 deletions

View file

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

View file

@ -297,16 +297,14 @@ where
/// ```
/// # use tui::widgets::Chart;
/// # use tui::layout::Constraint;
/// # fn main() {
/// let constraints = (
/// Constraint::Ratio(1, 3),
/// Constraint::Ratio(1, 4)
/// );
/// // 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.
/// let _chart: Chart<String, String> = Chart::default()
/// .hidden_legend_constraints(constraints);
/// # }
/// let constraints = (
/// Constraint::Ratio(1, 3),
/// Constraint::Ratio(1, 4)
/// );
/// // 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.
/// let _chart: Chart<String, String> = Chart::default()
/// .hidden_legend_constraints(constraints);
pub fn hidden_legend_constraints(
mut self,
constraints: (Constraint, Constraint),

View file

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