From 7e01b4fb9cb98e4fe3498029b7de46ee57856ddf Mon Sep 17 00:00:00 2001 From: Rh4096 Date: Tue, 3 Dec 2024 18:13:40 +0700 Subject: [PATCH] day 3.1 --- src/solutions/day_3.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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");