From 09cd17d3ff815172c2e58dba82fd31746b316a8c Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Fri, 5 Dec 2025 04:30:19 -0800 Subject: [PATCH] grid: clippies --- utils/grid/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/grid/lib.rs b/utils/grid/lib.rs index daed417..f2fa866 100644 --- a/utils/grid/lib.rs +++ b/utils/grid/lib.rs @@ -452,7 +452,7 @@ impl Grid { } /// Return an iterator over the 8 neighbours of c. The iterator skips neighbouring positions outside of the grid. - pub fn adjacent_iter(&self, c: &C) -> OffsetsIter { + pub fn adjacent_iter<'a, C: AsCoord2d + Copy>(&'a self, c: &'a C) -> OffsetsIter<'a, T> { OffsetsIter { grid: self, origin: c.to_coord(), @@ -462,7 +462,7 @@ impl Grid { } /// Return an iterator over the 4 cardinal neighbours of c. The iterator skips neighbouring positions outside of the grid. - pub fn cardinal_iter(&self, c: &C) -> OffsetsIter { + pub fn cardinal_iter<'a, C: AsCoord2d + Copy>(&'a self, c: &'a C) -> OffsetsIter<'a, T> { OffsetsIter { grid: self, origin: c.to_coord(),