about summary refs log tree commit diff
path: root/src/libcollections
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-20 21:51:01 +0100
committerGuillaume Gomez <guillaume1.gomez@gmail.com>2017-01-20 21:51:01 +0100
commit668af801cfe80e6cae350b2587f99bbe869ec96e (patch)
treeb859051f3a94ddcc98602d4b5977c37c4ac0aaef /src/libcollections
parentba841f056e888549ef0bec0f79262ae65444d0fd (diff)
downloadrust-668af801cfe80e6cae350b2587f99bbe869ec96e.tar.gz
rust-668af801cfe80e6cae350b2587f99bbe869ec96e.zip
Add debug implementation for BinaryHeapPlace
Diffstat (limited to 'src/libcollections')
-rw-r--r--src/libcollections/binary_heap.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs
index 93b864a007f..b9d90c358fe 100644
--- a/src/libcollections/binary_heap.rs
+++ b/src/libcollections/binary_heap.rs
@@ -1236,6 +1236,15 @@ where T: Clone + Ord {
     place: vec::PlaceBack<'a, T>,
 }
 
+#[stable(feature = "collection_debug", since = "1.15.0")]
+impl<'a, T: Clone + Ord + fmt::Debug> fmt::Debug for BinaryHeapPlace<'a, T> {
+    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
+        f.debug_tuple("BinaryHeapPlace")
+         .field(&self)
+         .finish()
+    }
+}
+
 #[unstable(feature = "collection_placement",
            reason = "placement protocol is subject to change",
            issue = "30172")]