Skip to content

Commit ec4e9cd

Browse files
committed
Use Self in alloc
1 parent 87a5dec commit ec4e9cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/alloc/src/collections/binary_heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
//! // Explicitly implement the trait so the queue becomes a min-heap
3131
//! // instead of a max-heap.
3232
//! impl Ord for State {
33-
//! fn cmp(&self, other: &State) -> Ordering {
33+
//! fn cmp(&self, other: &Self) -> Ordering {
3434
//! // Notice that the we flip the ordering on costs.
3535
//! // In case of a tie we compare positions - this step is necessary
3636
//! // to make implementations of `PartialEq` and `Ord` consistent.
@@ -41,7 +41,7 @@
4141
//!
4242
//! // `PartialOrd` needs to be implemented as well.
4343
//! impl PartialOrd for State {
44-
//! fn partial_cmp(&self, other: &State) -> Option<Ordering> {
44+
//! fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
4545
//! Some(self.cmp(other))
4646
//! }
4747
//! }

0 commit comments

Comments
 (0)