diff options
author | 2020-05-02 03:37:20 +0200 | |
---|---|---|
committer | 2020-05-02 03:37:20 +0200 | |
commit | 8fa9e4c94eb9d6b6e13b45fd6a99209536880a2d (patch) | |
tree | 47df0949a4acd373a04b3f86d6f93544c10b6b3f /examples/game_of_life | |
parent | 4fd8e47737e82817d652d86b306400da663f7a98 (diff) | |
download | iced-8fa9e4c94eb9d6b6e13b45fd6a99209536880a2d.tar.gz iced-8fa9e4c94eb9d6b6e13b45fd6a99209536880a2d.tar.bz2 iced-8fa9e4c94eb9d6b6e13b45fd6a99209536880a2d.zip |
Rename `visible_in` to `within` in `game_of_life`
Diffstat (limited to 'examples/game_of_life')
-rw-r--r-- | examples/game_of_life/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/game_of_life/src/main.rs b/examples/game_of_life/src/main.rs index fb4b5b75..88fd3a93 100644 --- a/examples/game_of_life/src/main.rs +++ b/examples/game_of_life/src/main.rs @@ -339,7 +339,7 @@ mod grid { let region = self.visible_region(frame.size()); - for cell in self.life.visible_in(region) { + for cell in self.life.within(region) { frame.fill_rectangle( Point::new(cell.j as f32, cell.i as f32), Size::UNIT, @@ -433,7 +433,7 @@ mod grid { self.cells.insert(cell); } - fn visible_in(&self, region: Rectangle) -> impl Iterator<Item = &Cell> { + fn within(&self, region: Rectangle) -> impl Iterator<Item = &Cell> { let first_row = (region.y / Cell::SIZE as f32).floor() as isize; let first_column = (region.x / Cell::SIZE as f32).floor() as isize; |