We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87a5dec commit ec4e9cdCopy full SHA for ec4e9cd
library/alloc/src/collections/binary_heap.rs
@@ -30,7 +30,7 @@
30
//! // Explicitly implement the trait so the queue becomes a min-heap
31
//! // instead of a max-heap.
32
//! impl Ord for State {
33
-//! fn cmp(&self, other: &State) -> Ordering {
+//! fn cmp(&self, other: &Self) -> Ordering {
34
//! // Notice that the we flip the ordering on costs.
35
//! // In case of a tie we compare positions - this step is necessary
36
//! // to make implementations of `PartialEq` and `Ord` consistent.
@@ -41,7 +41,7 @@
41
//!
42
//! // `PartialOrd` needs to be implemented as well.
43
//! impl PartialOrd for State {
44
-//! fn partial_cmp(&self, other: &State) -> Option<Ordering> {
+//! fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
45
//! Some(self.cmp(other))
46
//! }
47
0 commit comments