diff --git a/src/lib.rs b/src/lib.rs index 96e7a24..8f08401 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -748,6 +748,30 @@ impl Drop for IntoIter { } } +impl Clone for IntoIter +where + A::Item: Clone, +{ + fn clone(&self) -> IntoIter { + self.v[self.index.to_usize()..] + .iter() + .cloned() + .collect::>() + .into_iter() + } +} + +impl fmt::Debug for IntoIter +where + A::Item: fmt::Debug, +{ + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + f.debug_list() + .entries(&self.v[self.index.to_usize()..]) + .finish() + } +} + /// A draining iterator for `ArrayVec`. pub struct Drain<'a, A> where A: Array,