Switch to rust edition 2021.
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
name = "aoc_2019"
|
name = "aoc_2019"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
authors = ["Johannes <jschaef@mail.uni-paderborn.de>"]
|
authors = ["Johannes <jschaef@mail.uni-paderborn.de>"]
|
||||||
edition = "2018"
|
edition = "2021"
|
||||||
|
|
||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ impl Life {
|
|||||||
if self.at(Pos(x, y)) == Bug {
|
if self.at(Pos(x, y)) == Bug {
|
||||||
if Pos(x, y)
|
if Pos(x, y)
|
||||||
.neighbors()
|
.neighbors()
|
||||||
.into_iter()
|
.iter()
|
||||||
.filter(|p| self.at(**p) == Bug)
|
.filter(|p| self.at(**p) == Bug)
|
||||||
.count()
|
.count()
|
||||||
!= 1
|
!= 1
|
||||||
@@ -238,7 +238,7 @@ impl Life {
|
|||||||
} else {
|
} else {
|
||||||
let count = Pos(x, y)
|
let count = Pos(x, y)
|
||||||
.neighbors()
|
.neighbors()
|
||||||
.into_iter()
|
.iter()
|
||||||
.filter(|p| self.at(**p) == Bug)
|
.filter(|p| self.at(**p) == Bug)
|
||||||
.count();
|
.count();
|
||||||
if count == 1 || count == 2 {
|
if count == 1 || count == 2 {
|
||||||
|
|||||||
Reference in New Issue
Block a user