Skip to content

Commit

Permalink
Auto merge of #196 - Nemo157:intoiter-debug, r=mbrubeck
Browse files Browse the repository at this point in the history
impl Debug for IntoIter

This has long been provided by `std::vec::IntoIter`, so is useful in cases where it is being directly replaced.
  • Loading branch information
bors-servo committed Jan 27, 2020
2 parents 34d7b8d + a4ed1b8 commit 6e61239
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib.rs
Expand Up @@ -1513,6 +1513,15 @@ pub struct IntoIter<A: Array> {
end: usize,
}

impl<A: Array> fmt::Debug for IntoIter<A>
where
A::Item: fmt::Debug,
{
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("IntoIter").field(&self.as_slice()).finish()
}
}

impl<A: Array + Clone> Clone for IntoIter<A>
where
A::Item: Clone,
Expand Down

0 comments on commit 6e61239

Please sign in to comment.