From 8fa9e4c94eb9d6b6e13b45fd6a99209536880a2d Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Sat, 2 May 2020 03:37:20 +0200 Subject: Rename `visible_in` to `within` in `game_of_life` --- examples/game_of_life/src/main.rs | 4 ++-- 1 file 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 { + fn within(&self, region: Rectangle) -> impl Iterator { let first_row = (region.y / Cell::SIZE as f32).floor() as isize; let first_column = (region.x / Cell::SIZE as f32).floor() as isize; -- cgit