File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
library/alloc/src/collections Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change 30
30
//! // Explicitly implement the trait so the queue becomes a min-heap
31
31
//! // instead of a max-heap.
32
32
//! impl Ord for State {
33
- //! fn cmp(&self, other: &State ) -> Ordering {
33
+ //! fn cmp(&self, other: &Self ) -> Ordering {
34
34
//! // Notice that the we flip the ordering on costs.
35
35
//! // In case of a tie we compare positions - this step is necessary
36
36
//! // to make implementations of `PartialEq` and `Ord` consistent.
41
41
//!
42
42
//! // `PartialOrd` needs to be implemented as well.
43
43
//! impl PartialOrd for State {
44
- //! fn partial_cmp(&self, other: &State ) -> Option<Ordering> {
44
+ //! fn partial_cmp(&self, other: &Self ) -> Option<Ordering> {
45
45
//! Some(self.cmp(other))
46
46
//! }
47
47
//! }
You can’t perform that action at this time.
0 commit comments