grid: find_all return an iterator that is Clone
This commit is contained in:
1 file changed
+1
-1
@@ -422,7 +422,7 @@ impl<T: Clone + Eq + PartialEq + Debug> Grid<T> {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
/// Get all of the coordinates having value `needle`
|
/// Get all of the coordinates having value `needle`
|
||||||
pub fn find_all<'a>(&'a self, needle: &'a T) -> impl DoubleEndedIterator<Item = Coord2d> + 'a {
|
pub fn find_all<'a>(&'a self, needle: &'a T) -> impl DoubleEndedIterator<Item = Coord2d> + Clone + 'a {
|
||||||
self.data
|
self.data
|
||||||
.iter()
|
.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
|
|||||||
Reference in new issue
Block a user