We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
impl<T> From<BinaryHeap<T>> for Vec<T>
1 parent d85db82 commit 8b0d0a0Copy full SHA for 8b0d0a0
library/alloc/src/collections/binary_heap.rs
@@ -1343,6 +1343,10 @@ impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
1343
1344
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
1345
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.
1350
fn from(heap: BinaryHeap<T>) -> Vec<T> {
1351
heap.data
1352
}
0 commit comments