1
0

Update formatting

This commit is contained in:
Stefan Müller
2026-01-26 21:58:01 +01:00
parent 6d499efd3c
commit d28f2ff79e
5 changed files with 19 additions and 6 deletions
+4 -1
View File
@@ -16,7 +16,10 @@ impl Solver for TrashCompactor {
let mut part1 = 0;
let mut grid = Grid::new(0, 0);
for line in reader.lines().map_while(Result::ok) {
let v: Vec<&str> = line.split(Self::NUMBER_SPLIT_CHAR).filter(|s| !s.is_empty()).collect();
let v: Vec<&str> = line
.split(Self::NUMBER_SPLIT_CHAR)
.filter(|s| !s.is_empty())
.collect();
match v[0].parse::<u32>() {
Ok(_) => grid.push_row(v.iter().map(|n| n.parse::<u64>().unwrap()).collect()),
Err(_) => {