grid: clippies

This commit is contained in:
2025-12-05 04:30:19 -08:00
parent 73765e857a
commit 09cd17d3ff

View File

@@ -452,7 +452,7 @@ impl<T: Clone + Eq + PartialEq + Debug> Grid<T> {
} }
/// Return an iterator over the 8 neighbours of c. The iterator skips neighbouring positions outside of the grid. /// Return an iterator over the 8 neighbours of c. The iterator skips neighbouring positions outside of the grid.
pub fn adjacent_iter<C: AsCoord2d + Copy>(&self, c: &C) -> OffsetsIter<T> { pub fn adjacent_iter<'a, C: AsCoord2d + Copy>(&'a self, c: &'a C) -> OffsetsIter<'a, T> {
OffsetsIter { OffsetsIter {
grid: self, grid: self,
origin: c.to_coord(), origin: c.to_coord(),
@@ -462,7 +462,7 @@ impl<T: Clone + Eq + PartialEq + Debug> Grid<T> {
} }
/// Return an iterator over the 4 cardinal neighbours of c. The iterator skips neighbouring positions outside of the grid. /// Return an iterator over the 4 cardinal neighbours of c. The iterator skips neighbouring positions outside of the grid.
pub fn cardinal_iter<C: AsCoord2d + Copy>(&self, c: &C) -> OffsetsIter<T> { pub fn cardinal_iter<'a, C: AsCoord2d + Copy>(&'a self, c: &'a C) -> OffsetsIter<'a, T> {
OffsetsIter { OffsetsIter {
grid: self, grid: self,
origin: c.to_coord(), origin: c.to_coord(),