Skip to content

Commit

Permalink
Relax some trait bounds on BinaryHeap<T, C>
Browse files Browse the repository at this point in the history
This is inspired by rust-lang/rust#58421: "Relax some `Ord` bounds on
`BinaryHeap<T>`", which split out the methods of `BinaryHeap<T>` which
do not require the bound `T: Ord` to a separate impl block.

Note that in order to do something similar here, we also have to remove
the trait bound `C: Compare<T>` from the definition of the struct
`BinaryHeap<T, C>`; the upstream definition of `BinaryHeap<T>` did not
have the analogous bound `T: Ord` on the struct definition in the first
place.
  • Loading branch information
clint-white committed Aug 6, 2022
1 parent b3db7f1 commit 0e5ce1a
Showing 1 changed file with 318 additions and 319 deletions.
Loading

0 comments on commit 0e5ce1a

Please sign in to comment.