grid: clippies
This commit is contained in:
@@ -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(),
|
||||||
|
|||||||
Reference in New Issue
Block a user