Why the `cycle()` method exists if `ChunksMut` is never `Clone?`

Viewed 97
1 Answers

ChunksMut implements the Iterator trait.

impl<'a, T> Iterator for ChunksMut<'a, T>

And the cycle() comes from the default implementation of Iterator trait. cycle has a predicate(where Self: Clone) which restrict calling cycle on types that are not cloneable.

fn cycle(self) -> Cycle<Self>
where
    Self: Clone, 
Related