Skip to content

Commit 8b0d0a0

Browse files
committed
Add documentation for impl<T> From<BinaryHeap<T>> for Vec<T>
1 parent d85db82 commit 8b0d0a0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

library/alloc/src/collections/binary_heap.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1343,6 +1343,10 @@ impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
13431343

13441344
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
13451345
impl<T> From<BinaryHeap<T>> for Vec<T> {
1346+
/// Converts a `BinaryHeap<T>` into a `Vec<T>`.
1347+
///
1348+
/// This conversion requires no data movement or allocation, and has
1349+
/// constant time complexity.
13461350
fn from(heap: BinaryHeap<T>) -> Vec<T> {
13471351
heap.data
13481352
}

0 commit comments

Comments
 (0)