naming
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
This commit is contained in:
parent
4d81501fa6
commit
9ce23811d5
|
@ -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<Self::Item> {
|
||||
|
|
Loading…
Reference in New Issue