diff options
| author | bors <bors@rust-lang.org> | 2017-06-24 09:32:20 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-06-24 09:32:20 +0000 |
| commit | 7e76505e0105e3102ed14d827dd727afc1c9fd92 (patch) | |
| tree | 01fae6d0aa3e37e561aea864057a917b2976ee5c /src/liballoc | |
| parent | b0081b36b457b697d4b87670ca66b6d082c8ebfd (diff) | |
| parent | 545bfcd864683a6e774762cf5f872615de7b1b51 (diff) | |
Auto merge of #42854 - razielgn:relaxed-debug-constraints-on-maps-iterators, r=sfackler
Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}.
I has hit by this yesterday too. 😄
And I've realised that Debug for BTreeMap::{Keys,Values} wasn't formatting just keys and values respectively, but the whole map. 🤔
Fixed #41924
r? @jonhoo
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/btree/map.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/liballoc/btree/map.rs b/src/liballoc/btree/map.rs index d73c0254a74..a51c70159db 100644 --- a/src/liballoc/btree/map.rs +++ b/src/liballoc/btree/map.rs @@ -334,9 +334,9 @@ 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> { +impl<'a, K: 'a + fmt::Debug, V: 'a> 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() } } @@ -353,9 +353,9 @@ 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> { +impl<'a, K: 'a, 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() } } |
