From 9ce23811d5aa286658b7d7fca9d116410dfb9034 Mon Sep 17 00:00:00 2001 From: Fabrizio Iannetti Date: Fri, 29 Sep 2023 22:55:35 +0200 Subject: [PATCH] naming Signed-off-by: Fabrizio Iannetti --- src/ui/basics.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/basics.rs b/src/ui/basics.rs index 1f4a4b0..ee05bae 100644 --- a/src/ui/basics.rs +++ b/src/ui/basics.rs @@ -26,7 +26,7 @@ pub struct CellGrid { num_y: u32, } -pub struct CellGridCells<'a> { +pub struct CellGridIterator<'a> { grid: &'a CellGrid, // current position when iterating @@ -49,8 +49,8 @@ impl CellGrid { } } - pub fn iter(&self) -> CellGridCells { - CellGridCells { + pub fn iter(&self) -> CellGridIterator { + CellGridIterator { grid: self, pos_x: 0, pos_y: 0, @@ -78,7 +78,7 @@ impl CellGrid { } } -impl<'a> CellGridCells<'a> { +impl<'a> CellGridIterator<'a> { fn compute_cell(&mut self) -> () { let grid: &'a CellGrid = self.grid; self.curr.pos_x = self.pos_x; @@ -96,7 +96,7 @@ impl<'a> CellGridCells<'a> { } } -impl<'a> Iterator for CellGridCells<'a> { +impl<'a> Iterator for CellGridIterator<'a> { type Item = Cell; fn next(&mut self) -> Option {