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 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.
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//! }
You can’t perform that action at this time.
0 commit comments