diff --git a/src/backend/crossterm.rs b/src/backend/crossterm.rs index 9b9aa29..f4e231f 100644 --- a/src/backend/crossterm.rs +++ b/src/backend/crossterm.rs @@ -93,7 +93,7 @@ where map_error(queue!( self.buffer, - Print(string.clone()), + Print(string), SetForegroundColor(CColor::Reset), SetBackgroundColor(CColor::Reset), SetAttribute(CAttribute::Reset) diff --git a/src/widgets/chart.rs b/src/widgets/chart.rs index ed690e7..62e5b72 100644 --- a/src/widgets/chart.rs +++ b/src/widgets/chart.rs @@ -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 = 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 = Chart::default() + /// .hidden_legend_constraints(constraints); pub fn hidden_legend_constraints( mut self, constraints: (Constraint, Constraint), diff --git a/tests/gauge.rs b/tests/gauge.rs index f7033ea..df743dd 100644 --- a/tests/gauge.rs +++ b/tests/gauge.rs @@ -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();