File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -472,9 +472,10 @@ impl<T: Ord> Ord for Reverse<T> {
472472/// Then you must define an implementation for `cmp()`. You may find it useful to use
473473/// `cmp()` on your type's fields.
474474///
475- /// Implementations of `PartialEq`, `PartialOrd`, and `Ord` *must* agree with each other. It's
476- /// easy to accidentally make them disagree by deriving some of the traits and manually
477- /// implementing others.
475+ /// Implementations of `PartialEq`, `PartialOrd`, and `Ord` *must*
476+ /// agree with each other. That is, `a.cmp(b) == Ordering::Equal` if
477+ /// and only if `a == b`. It's easy to accidentally make them disagree
478+ /// by deriving some of the traits and manually implementing others.
478479///
479480/// Here's an example where you want to sort people by height only, disregarding `id`
480481/// and `name`:
You can’t perform that action at this time.
0 commit comments