diff options
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/binary_heap.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/library/alloc/src/collections/binary_heap.rs b/library/alloc/src/collections/binary_heap.rs index 7fb7686a6e2..7d87974b47e 100644 --- a/library/alloc/src/collections/binary_heap.rs +++ b/library/alloc/src/collections/binary_heap.rs @@ -1584,6 +1584,14 @@ impl<T: Ord, I: IntoIterator<Item = T>> SpecExtend<I> for BinaryHeap<T> { } } +impl<T: Ord> SpecExtend<Vec<T>> for BinaryHeap<T> { + fn spec_extend(&mut self, ref mut other: Vec<T>) { + let start = self.data.len(); + self.data.append(other); + self.rebuild_tail(start); + } +} + impl<T: Ord> SpecExtend<BinaryHeap<T>> for BinaryHeap<T> { fn spec_extend(&mut self, ref mut other: BinaryHeap<T>) { self.append(other); |
