Skip to content

Commit 2ea1d2d

Browse files
committed
Correctly iterate on keys/values when debugging BTreeMap::{Keys,Values}.
1 parent bd32b1b commit 2ea1d2d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/liballoc/btree/map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ pub struct Keys<'a, K: 'a, V: 'a> {
336336
#[stable(feature = "collection_debug", since = "1.17.0")]
337337
impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Keys<'a, K, V> {
338338
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
339-
f.debug_list().entries(self.inner.clone()).finish()
339+
f.debug_list().entries(self.clone()).finish()
340340
}
341341
}
342342

@@ -355,7 +355,7 @@ pub struct Values<'a, K: 'a, V: 'a> {
355355
#[stable(feature = "collection_debug", since = "1.17.0")]
356356
impl<'a, K: 'a + fmt::Debug, V: 'a + fmt::Debug> fmt::Debug for Values<'a, K, V> {
357357
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
358-
f.debug_list().entries(self.inner.clone()).finish()
358+
f.debug_list().entries(self.clone()).finish()
359359
}
360360
}
361361

0 commit comments

Comments
 (0)