becheran/grid

Clone on GridRowIter/GridColIter ?

mirsella opened this issue · 2 comments

Hello !

Would it be possible to implement Clone on theses iterators ? The underlying SkipBy iterator implement it, I'm new to rust but from what I've seen it should be possible ?

The use case is having an iterator at a certain point and cloning it to get two iterator starting at the same place:

let rows = grid.iter_rows().skip(1);
let r1 = rows.clone().take(10);
let r2 = rows.skip(10);

Here we need the clone because take consume the iterator AFAIK.

Thanks !

opened #40

Would be very useful!