about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorFederico Ravasio <ravasio.federico@gmail.com>2017-06-23 12:47:43 +0200
committerFederico Ravasio <ravasio.federico@gmail.com>2017-06-23 12:47:43 +0200
commit2ea1d2d0077914282d87cfd66897410f6214daa7 (patch)
treeee7a57e97bd1806c29225ad02ddd739aeb3024aa /src/liballoc
parentbd32b1ba0d2d51a7e8505c1d3e37d17d3ba12843 (diff)
downloadrust-2ea1d2d0077914282d87cfd66897410f6214daa7.tar.gz
rust-2ea1d2d0077914282d87cfd66897410f6214daa7.zip
Correctly iterate on keys/values when debugging BTreeMap::{Keys,Values}.
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/btree/map.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/btree/map.rs b/src/liballoc/btree/map.rs
index d73c0254a74..6656c90d7e9 100644
--- a/src/liballoc/btree/map.rs
+++ b/src/liballoc/btree/map.rs
@@ -336,7 +336,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
 #[stable(feature = "collection_debug", since = "1.17.0")]
 impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Keys<'a, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_list().entries(self.inner.clone()).finish()
+        f.debug_list().entries(self.clone()).finish()
     }
 }
 
@@ -355,7 +355,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
 #[stable(feature = "collection_debug", since = "1.17.0")]
 impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V> {
     fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
-        f.debug_list().entries(self.inner.clone()).finish()
+        f.debug_list().entries(self.clone()).finish()
     }
 }