Update formatting
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user