summary refs log tree commit diff
path: root/src/libcollections/vec_deque.rs
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-04-17 18:06:43 +0200
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-04-19 18:50:01 +0200
commita850cdcb7ec82cc5eaec76ee90b6ee1794a6da9b (patch)
tree802d2d01ac7cf8a22e7ab09736d54bac776b07ef /src/libcollections/vec_deque.rs
parent5997806a6a4f1e57491bd9f24c7ac07619bf38d2 (diff)
downloadrust-a850cdcb7ec82cc5eaec76ee90b6ee1794a6da9b.tar.gz
rust-a850cdcb7ec82cc5eaec76ee90b6ee1794a6da9b.zip
Fix debug infinite loop
Diffstat (limited to 'src/libcollections/vec_deque.rs')
-rw-r--r--src/libcollections/vec_deque.rs14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs
index 2ce3b92843b..f0e61ebc47b 100644
--- a/src/libcollections/vec_deque.rs
+++ b/src/libcollections/vec_deque.rs
@@ -1913,7 +1913,9 @@ pub struct Iter<'a, T: 'a> {
 impl<'a, T: 'a + fmt::Debug> fmt::Debug for Iter<'a, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Iter")
-         .field(&self.clone())
+         .field(&self.ring)
+         .field(&self.tail)
+         .field(&self.head)
          .finish()
     }
 }
@@ -2000,7 +2002,9 @@ pub struct IterMut<'a, T: 'a> {
 impl<'a, T: 'a + fmt::Debug> fmt::Debug for IterMut<'a, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("IterMut")
-         .field(&self.clone())
+         .field(&self.ring)
+         .field(&self.tail)
+         .field(&self.head)
          .finish()
     }
 }
@@ -2081,7 +2085,7 @@ pub struct IntoIter<T> {
 impl<T: fmt::Debug> fmt::Debug for IntoIter<T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("IntoIter")
-         .field(&self.clone())
+         .field(&self.inner)
          .finish()
     }
 }
@@ -2139,7 +2143,9 @@ pub struct Drain<'a, T: 'a> {
 impl<'a, T: 'a + fmt::Debug> fmt::Debug for Drain<'a, T> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
         f.debug_tuple("Drain")
-         .field(&self.clone())
+         .field(&self.after_tail)
+         .field(&self.after_head)
+         .field(&self.iter)
          .finish()
     }
 }