diff --git a/Cargo.toml b/Cargo.toml index 0620ed1..62e4495 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "aoc_2019" version = "0.1.0" authors = ["Johannes "] -edition = "2018" +edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/tasks/day24.rs b/src/tasks/day24.rs index 2db44d1..848f879 100644 --- a/src/tasks/day24.rs +++ b/src/tasks/day24.rs @@ -228,7 +228,7 @@ impl Life { if self.at(Pos(x, y)) == Bug { if Pos(x, y) .neighbors() - .into_iter() + .iter() .filter(|p| self.at(**p) == Bug) .count() != 1 @@ -238,7 +238,7 @@ impl Life { } else { let count = Pos(x, y) .neighbors() - .into_iter() + .iter() .filter(|p| self.at(**p) == Bug) .count(); if count == 1 || count == 2 {