From 876ca269003f75d12f8f96e69ea1b8f3045eca78 Mon Sep 17 00:00:00 2001 From: Rh4096 Date: Tue, 3 Dec 2024 18:31:15 +0700 Subject: [PATCH] day 2.1 --- src/solutions/day_2.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/solutions/day_2.rs b/src/solutions/day_2.rs index 44d1b5b..2a89435 100644 --- a/src/solutions/day_2.rs +++ b/src/solutions/day_2.rs @@ -35,7 +35,7 @@ impl LevelValidator { } impl AocSolution for AocDayTwoSolution { - type Output = usize; + type Output = u64; const INPUT: &str = include_str!("../../input/day2.txt"); fn part_one(&self) -> Self::Output { @@ -49,7 +49,7 @@ impl AocSolution for AocDayTwoSolution { .collect::>() }) .filter(|s| validator.is_safe(s)) - .count() + .count() as u64 } fn part_two(&self) -> Self::Output { @@ -63,6 +63,6 @@ impl AocSolution for AocDayTwoSolution { .collect::>() }) .filter(|s| validator.is_safe(s) || validator.is_safe_with_rem(s)) - .count() + .count() as u64 } }