Rework day 1

Simplify part 2 a lot, by not actually computing the sums because they
do not matter, only the changes do. Also eliminate the allocation
overhead while parsing line-by-line input.

Fixes the existing clippy error because the offending line no longer
exists.
This commit is contained in:
2021-12-01 20:35:27 +01:00
parent f413b08da6
commit 938eda0d22
3 changed files with 51 additions and 22 deletions

View File

@@ -2,6 +2,7 @@ use std::io::Read;
type Solution = fn(&mut dyn Read) -> String;
mod common;
mod day01;
mod day02;
mod day03;