diff options
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; } |