fn next(&mut self) -> Option<Self::Item> {
        let nxt_row = self.row + self.step_size.down;

        if nxt_row < self.rows {
            self.row = nxt_row;
            self.col += self.step_size.right;

            Some((self.row, self.col))
        } else {
            None
        }
    }
/// Everytime you ask for the next element, it checks if there are further rows of trees to traverse over.
Everytime you ask for the next element, it checks if there are further rows of trees to traverse over.
Everytime you ask for the next element it checks if there are further rows of trees to traverse over .
fn next(&mut self) -> Option<Self::Item> {
        let nxt_row = self.row + self.step_size.down;
        if nxt_row < self.rows {
            self.row = nxt_row;
            self.col += self.step_size.right;
            Some((self.row, self.col))
        } else {
            None
        }
    }
fn next ( & mut self ) -> Option < Self :: Item > { let nxt_row = self . row + self . step_size . down ; if nxt_row < self . rows { self . row = nxt_row ; self . col += self . step_size . right ; Some ( ( self . row , self . col ) ) } else { None } }
Everytime you ask for the next element, it checks if there are further rows of trees to traverse over.
Everytime you ask for the next element it checks if there are further rows of trees to traverse over .
&mut self
&mut self