mirror of
https://github.com/bertptrs/adventofcode.git
synced 2025-12-26 21:30:31 +01:00
Correct formatting.
This commit is contained in:
@@ -50,7 +50,7 @@ impl From<char> for Tile {
|
||||
'|' => Tile::Tree,
|
||||
'#' => Tile::Lumber,
|
||||
'.' => Tile::Open,
|
||||
_ => Tile::Invalid
|
||||
_ => Tile::Invalid,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -129,9 +129,12 @@ impl Day18 {
|
||||
}
|
||||
|
||||
fn score(&self) -> String {
|
||||
let result = self.grid.iter()
|
||||
let result = self
|
||||
.grid
|
||||
.iter()
|
||||
.flat_map(|x| x.iter())
|
||||
.cloned().grouping_count();
|
||||
.cloned()
|
||||
.grouping_count();
|
||||
|
||||
(result[&Tile::Tree] * result[&Tile::Lumber]).to_string()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user