Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions library/alloc/src/collections/binary_heap/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl<T: Clone, A: Allocator + Clone> Clone for BinaryHeap<T, A> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<T: Ord> Default for BinaryHeap<T> {
impl<T> Default for BinaryHeap<T> {
/// Creates an empty `BinaryHeap<T>`.
#[inline]
fn default() -> BinaryHeap<T> {
Expand Down Expand Up @@ -496,7 +496,7 @@ impl<T: Ord, A: Allocator> Drop for RebuildOnDrop<'_, T, A> {
}
}

impl<T: Ord> BinaryHeap<T> {
impl<T> BinaryHeap<T> {
/// Creates an empty `BinaryHeap` as a max-heap.
///
/// # Examples
Expand Down Expand Up @@ -537,7 +537,7 @@ impl<T: Ord> BinaryHeap<T> {
}
}

impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
impl<T, A: Allocator> BinaryHeap<T, A> {
/// Creates an empty `BinaryHeap` as a max-heap, using `A` as allocator.
///
/// # Examples
Expand Down Expand Up @@ -581,7 +581,9 @@ impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
pub fn with_capacity_in(capacity: usize, alloc: A) -> BinaryHeap<T, A> {
BinaryHeap { data: Vec::with_capacity_in(capacity, alloc) }
}
}

impl<T: Ord, A: Allocator> BinaryHeap<T, A> {
/// Returns a mutable reference to the greatest item in the binary heap, or
/// `None` if it is empty.
///
Expand Down
Loading