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
+6 -2
View File
@@ -1,5 +1,5 @@
use crate::solvers::Solver;
use grid::*;
use grid::Grid;
use std::io::BufRead;
pub struct PrintingDepartment {}
@@ -15,7 +15,11 @@ impl Solver for PrintingDepartment {
fn process_data<R: BufRead>(&self, reader: R) -> (u64, u64) {
let mut grid = Grid::new(0, 0);
for line in reader.lines().map_while(Result::ok) {
grid.push_row(line.bytes().map(|c| c == Self::PAPER_ROLL_CHAR as u8).collect());
grid.push_row(
line.bytes()
.map(|c| c == Self::PAPER_ROLL_CHAR as u8)
.collect(),
);
}
let mut part1 = 0;