diff --git a/2018/Cargo.toml b/2018/Cargo.toml index aecd18f..4979375 100644 --- a/2018/Cargo.toml +++ b/2018/Cargo.toml @@ -8,7 +8,7 @@ description = "Implementation of the problems of Advent of Code 2018" clap = "2.32" regex = "1.1.0" chrono = "0.4.6" -itertools = "0.7.11" +itertools = "0.8" [dev-dependencies] bencher = "0.1.5" diff --git a/2018/src/day10.rs b/2018/src/day10.rs index 0e81516..28c7532 100644 --- a/2018/src/day10.rs +++ b/2018/src/day10.rs @@ -68,14 +68,14 @@ impl Day10 { } fn height(&self) -> i32 { - match self.points.iter().skip(1).step(2).minmax() { + match self.points.iter().skip(1).step_by(2).minmax() { MinMaxResult::MinMax(x, y) => { y - x + 1 } _ => panic!("Input does not make sense."), } } fn underestimate_time(&self) -> i32 { - let (lower, upper) = match self.points.iter().enumerate().skip(1).step(2).minmax_by_key(|&(_, y)| y) { + let (lower, upper) = match self.points.iter().enumerate().skip(1).step_by(2).minmax_by_key(|&(_, y)| y) { MinMaxResult::MinMax((x, _), (y, _)) => (x, y), _ => panic!("Input does not make sense"), };