diff --git a/src/day12.rs b/src/day12.rs index 3f9c98e..bbaedc2 100644 --- a/src/day12.rs +++ b/src/day12.rs @@ -1,6 +1,6 @@ use std::str::FromStr; -use aoc_runner_derive::{aoc, aoc_generator}; +use aoc_runner_derive::aoc; use grid::{Coord2d, Grid}; pub struct Farm { diff --git a/src/day13.rs b/src/day13.rs index ff2a299..b4fc3b0 100644 --- a/src/day13.rs +++ b/src/day13.rs @@ -20,9 +20,9 @@ impl ClawMachine { let prize_re = Regex::new(r"X=(\d+), Y=(\d+)").unwrap(); // consume 3 lines - a, b, prize if let Some((a_line, b_line, prize_line)) = input.filter(|l| !l.is_empty()).take(3).collect_tuple() { - let a_caps = ofs_re.captures(&a_line).unwrap(); - let b_caps = ofs_re.captures(&b_line).unwrap(); - let prize_caps = prize_re.captures(&prize_line).unwrap(); + let a_caps = ofs_re.captures(a_line).unwrap(); + let b_caps = ofs_re.captures(b_line).unwrap(); + let prize_caps = prize_re.captures(prize_line).unwrap(); let button_a = MachineAction( a_caps.get(1).unwrap().as_str().parse().unwrap(), a_caps.get(2).unwrap().as_str().parse().unwrap(),