Skip to content

Commit

Permalink
minor improvement
Browse files Browse the repository at this point in the history
Signed-off-by: Konstantin Läufer <[email protected]>
  • Loading branch information
klaeufer committed Mar 22, 2024
2 parents 5548ae1 + e252cdb commit 2873a1c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/bin/day1.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use once_cell::sync::Lazy;

fn main() -> io::Result<()> {
// trailing question mark returns early if there's an error
run_calibration("part 1", "day1input.txt", SIMPLE_DIGITS.as_ref())?;
run_calibration("part 2", "day1input.txt", ALL_DIGITS.as_ref())
run_calibration("part 1", "day1input.txt", &SIMPLE_DIGITS)?;
run_calibration("part 2", "day1input.txt", &ALL_DIGITS)
}

fn run_calibration(label: &str, file_name: &str, digits: &[String]) -> io::Result<()> {
Expand Down

0 comments on commit 2873a1c

Please sign in to comment.