Fmt.
This commit is contained in:
@@ -36,13 +36,16 @@ fn main() {
|
||||
let width = coordinates
|
||||
.iter()
|
||||
.map(|(x, _)| *x as usize)
|
||||
.max().expect("failed to find max x") + 1;
|
||||
.max()
|
||||
.expect("failed to find max x")
|
||||
+ 1;
|
||||
|
||||
let height = coordinates
|
||||
.iter()
|
||||
.map(|(_, y)| *y as usize)
|
||||
.max()
|
||||
.expect("failed to find max y") + 1;
|
||||
.expect("failed to find max y")
|
||||
+ 1;
|
||||
|
||||
let mut grid_view = vec![State::Empty; width * height].into_boxed_slice();
|
||||
|
||||
@@ -84,10 +87,12 @@ fn main() {
|
||||
|
||||
let (_, area) = areas
|
||||
.iter()
|
||||
.filter_map(|(i, area)| if let Area::Finite(area) = area {
|
||||
Some((i, area))
|
||||
} else {
|
||||
None
|
||||
.filter_map(|(i, area)| {
|
||||
if let Area::Finite(area) = area {
|
||||
Some((i, area))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.max_by_key(|(_, area)| *area)
|
||||
.expect("failed to find max area");
|
||||
|
||||
Reference in New Issue
Block a user