Fix clippy warnings

This commit is contained in:
Florian Dehau 2016-10-22 19:24:35 +02:00
parent 0419fa7157
commit 017eaa4122
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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;