diff options
author | Santo Cariotti <santo@dcariotti.me> | 2021-12-06 22:50:59 +0100 |
---|---|---|
committer | Santo Cariotti <santo@dcariotti.me> | 2021-12-06 22:50:59 +0100 |
commit | 3e4ae4519f5c52f39cff2a05c0b7435a453bed70 (patch) | |
tree | 9942fb8ac1e50d0ece6866d21e9bcea98416b342 /day1/src | |
parent | 5f574cf344f579787f3ba6a65831a8e80532acbd (diff) |
Fix day1
Diffstat (limited to 'day1/src')
-rw-r--r-- | day1/src/main.rs | 6 |
1 files changed, 1 insertions, 5 deletions
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::<Vec<i32>>(); 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; } |