From 18f87c492eb86902bc7570ddd4cf6d2a5d8a70bf Mon Sep 17 00:00:00 2001 From: mishco Date: Tue, 3 Dec 2024 14:38:13 +0100 Subject: [PATCH] Add day 03 --- src/bin/02.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/02.rs b/src/bin/02.rs index 2e46101..c539703 100644 --- a/src/bin/02.rs +++ b/src/bin/02.rs @@ -40,7 +40,7 @@ fn checking_level(numbers: &Vec) -> bool { let diff = (next - curr).abs(); - if diff < 1 || diff > 3 { + if !(1..=3).contains(&diff) { //unsafe return false }