Skip to content

Commit

Permalink
Apply one more fmt suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Vetter committed Feb 15, 2024
1 parent dce20dd commit d4be61d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/datastore.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,7 @@ impl DataStore {
]
}
pub fn y_axis_bounds(&self, chart_height: i32) -> ([f64; 2], i32) {
let iter = self
.data
.iter()
.flat_map(|b| b.as_slice())
.map(|v| v.1);
let iter = self.data.iter().flat_map(|b| b.as_slice()).map(|v| v.1);
let min = iter.clone().fold(f64::INFINITY, |a, b| a.min(b));
let max = iter.fold(0f64, |a, b| a.max(b));
let range = max - min;
Expand Down

0 comments on commit d4be61d

Please sign in to comment.