Add documentation for impl<T> From<BinaryHeap<T>> for Vec<T>

This commit is contained in:
Michael Howell 2020-09-09 11:53:24 -07:00
parent d85db82960
commit 8b0d0a0cad

View File

@ -1343,6 +1343,10 @@ impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
impl<T> From<BinaryHeap<T>> for Vec<T> {
/// Converts a `BinaryHeap<T>` into a `Vec<T>`.
///
/// This conversion requires no data movement or allocation, and has
/// constant time complexity.
fn from(heap: BinaryHeap<T>) -> Vec<T> {
heap.data
}