Skip to content

Commit

Permalink
Merge pull request #397 from Expurple/clone-iterator
Browse files Browse the repository at this point in the history
derive Clone on iterators
  • Loading branch information
tafia authored Jan 26, 2024
2 parents d33922d + 9aa65c9 commit 53a75f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ impl<T: CellType> IndexMut<(usize, usize)> for Range<T> {
}

/// A struct to iterate over all cells
#[derive(Debug)]
#[derive(Clone, Debug)]
pub struct Cells<'a, T: CellType> {
width: usize,
inner: std::iter::Enumerate<std::slice::Iter<'a, T>>,
Expand Down Expand Up @@ -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<std::slice::Iter<'a, T>>,
Expand Down Expand Up @@ -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<std::slice::Chunks<'a, T>>,
}
Expand Down

0 comments on commit 53a75f2

Please sign in to comment.