diff --git a/src/solutions/day_3.rs b/src/solutions/day_3.rs index 6936425..96659cc 100644 --- a/src/solutions/day_3.rs +++ b/src/solutions/day_3.rs @@ -10,9 +10,6 @@ static MUL: LazyLock = static COND_MUL: LazyLock = LazyLock::new(|| Regex::new(r"(mul\([0-9]{1,3},[0-9]{1,3}\))|(do\(\))|(don't\(\))").unwrap()); -#[derive(Clone, Copy)] -pub struct AocDayThreeSolution; - fn as_mul(s: &str) -> u64 { let (a, b) = s[4..(s.len() - 1)] .split_once(',') @@ -22,6 +19,9 @@ fn as_mul(s: &str) -> u64 { a * b } +#[derive(Clone, Copy)] +pub struct AocDayThreeSolution; + impl AocSolution for AocDayThreeSolution { type Output = u64; const INPUT: &str = include_str!("../../input/day3.txt");