From 3e4ae4519f5c52f39cff2a05c0b7435a453bed70 Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Mon, 6 Dec 2021 22:50:59 +0100 Subject: Fix day1 --- day1/src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'day1/src') diff --git a/day1/src/main.rs b/day1/src/main.rs index ed6c56c..7e18b94 100644 --- a/day1/src/main.rs +++ b/day1/src/main.rs @@ -11,11 +11,7 @@ fn main() { .collect::>(); let mut increasing: u16 = 0; - for (index, _) in values.iter().enumerate() { - if index == 0 { - continue; - } - + for index in 1..values.len() { if values[index - 1] < values[index] { increasing += 1; } -- cgit v1.2.3-18-g5258