diff options
Diffstat (limited to 'src/element/pie.rs')
-rw-r--r-- | src/element/pie.rs | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/src/element/pie.rs b/src/element/pie.rs index 9529834..79fa927 100644 --- a/src/element/pie.rs +++ b/src/element/pie.rs @@ -109,18 +109,14 @@ impl<'a, DB: DrawingBackend, Label: Display> Drawable<DB> for Pie<'a, (i32, i32) let radian_increment = PI / 180.0 / self.radius.sqrt() * 2.0; let mut perc_labels = Vec::new(); for (index, slice) in self.sizes.iter().enumerate() { - let slice_style = - self.colors - .get(index) - .ok_or_else(|| DrawingErrorKind::FontError(Box::new( - PieError::LengthMismatch, - )))?; + let slice_style = self + .colors + .get(index) + .ok_or_else(|| DrawingErrorKind::FontError(Box::new(PieError::LengthMismatch)))?; let label = self .labels .get(index) - .ok_or_else(|| DrawingErrorKind::FontError(Box::new( - PieError::LengthMismatch, - )))?; + .ok_or_else(|| DrawingErrorKind::FontError(Box::new(PieError::LengthMismatch)))?; // start building wedge line against the previous edge let mut points = vec![*self.center]; let ratio = slice / self.total; |