mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-26 06:30:29 +00:00
style: fix clippy warnings
This commit is contained in:
parent
6e24f9d47b
commit
d16db5ed90
3 changed files with 10 additions and 12 deletions
|
@ -93,7 +93,7 @@ where
|
|||
|
||||
map_error(queue!(
|
||||
self.buffer,
|
||||
Print(string.clone()),
|
||||
Print(string),
|
||||
SetForegroundColor(CColor::Reset),
|
||||
SetBackgroundColor(CColor::Reset),
|
||||
SetAttribute(CAttribute::Reset)
|
||||
|
|
|
@ -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),
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue