Skip to content

Commit fa7a40c

Browse files
committed
Document From trait for BinaryHeap
1 parent 2b78e10 commit fa7a40c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/liballoc/collections/binary_heap.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,6 +1163,9 @@ impl<T> FusedIterator for Drain<'_, T> {}
11631163

11641164
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
11651165
impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
1166+
/// Converts a `Vec` into a `BinaryHeap`.
1167+
///
1168+
/// This conversion happens in-place, and has O(n) time complexity.
11661169
fn from(vec: Vec<T>) -> BinaryHeap<T> {
11671170
let mut heap = BinaryHeap { data: vec };
11681171
heap.rebuild();

0 commit comments

Comments
 (0)