Switch to rust edition 2021.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user