mirror of
https://github.com/ratatui-org/ratatui
synced 2024-11-22 12:43:16 +00:00
Fix clippy warnings
This commit is contained in:
parent
0419fa7157
commit
017eaa4122
2 changed files with 2 additions and 2 deletions
|
@ -40,7 +40,7 @@ impl<'a> BarChart<'a> {
|
||||||
pub fn data(&'a mut self, data: &'a [(&'a str, u64)]) -> &mut BarChart<'a> {
|
pub fn data(&'a mut self, data: &'a [(&'a str, u64)]) -> &mut BarChart<'a> {
|
||||||
self.data = data;
|
self.data = data;
|
||||||
self.values = Vec::with_capacity(self.data.len());
|
self.values = Vec::with_capacity(self.data.len());
|
||||||
for &(l, v) in self.data {
|
for &(_, v) in self.data {
|
||||||
self.values.push(format!("{}", v));
|
self.values.push(format!("{}", v));
|
||||||
}
|
}
|
||||||
self
|
self
|
||||||
|
|
|
@ -214,7 +214,7 @@ impl<'a> Widget<'a> for Chart<'a> {
|
||||||
None => (Buffer::empty(*area), *area),
|
None => (Buffer::empty(*area), *area),
|
||||||
};
|
};
|
||||||
|
|
||||||
let layout = self.layout(&chart_area, &area);
|
let layout = self.layout(&chart_area, area);
|
||||||
let width = layout.graph_area.width;
|
let width = layout.graph_area.width;
|
||||||
let height = layout.graph_area.height;
|
let height = layout.graph_area.height;
|
||||||
let margin_x = layout.graph_area.x - area.x;
|
let margin_x = layout.graph_area.x - area.x;
|
||||||
|
|
Loading…
Reference in a new issue