From 9aa65c9ca897933b29a4c033b21c91747b79a3c9 Mon Sep 17 00:00:00 2001 From: Dmitrii Aleksandrov Date: Fri, 19 Jan 2024 12:45:33 +0400 Subject: [PATCH] derive Clone on iterators --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 2db5c967..d757e5a3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -767,7 +767,7 @@ impl IndexMut<(usize, usize)> for Range { } /// A struct to iterate over all cells -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Cells<'a, T: CellType> { width: usize, inner: std::iter::Enumerate>, @@ -800,7 +800,7 @@ impl<'a, T: 'a + CellType> DoubleEndedIterator for Cells<'a, T> { impl<'a, T: 'a + CellType> ExactSizeIterator for Cells<'a, T> {} /// A struct to iterate over used cells -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct UsedCells<'a, T: CellType> { width: usize, inner: std::iter::Enumerate>, @@ -838,7 +838,7 @@ impl<'a, T: 'a + CellType> DoubleEndedIterator for UsedCells<'a, T> { } /// An iterator to read `Range` struct row by row -#[derive(Debug)] +#[derive(Clone, Debug)] pub struct Rows<'a, T: CellType> { inner: Option>, }