Rollup merge of #67736 - taralx:patch-1, r=sfackler
Less-than is asymmetric, not antisymmetric This has bothered me for a while. It's such a small nit, but...
This commit is contained in:
commit
ed80f49be9
1 changed files with 2 additions and 2 deletions
|
|
@ -495,7 +495,7 @@ impl<T: Ord> Ord for Reverse<T> {
|
|||
///
|
||||
/// An order is a total order if it is (for all `a`, `b` and `c`):
|
||||
///
|
||||
/// - total and antisymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and
|
||||
/// - total and asymmetric: exactly one of `a < b`, `a == b` or `a > b` is true; and
|
||||
/// - transitive, `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
|
||||
///
|
||||
/// ## Derivable
|
||||
|
|
@ -674,7 +674,7 @@ impl PartialOrd for Ordering {
|
|||
///
|
||||
/// The comparison must satisfy, for all `a`, `b` and `c`:
|
||||
///
|
||||
/// - antisymmetry: if `a < b` then `!(a > b)`, as well as `a > b` implying `!(a < b)`; and
|
||||
/// - asymmetry: if `a < b` then `!(a > b)`, as well as `a > b` implying `!(a < b)`; and
|
||||
/// - transitivity: `a < b` and `b < c` implies `a < c`. The same must hold for both `==` and `>`.
|
||||
///
|
||||
/// Note that these requirements mean that the trait itself must be implemented symmetrically and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue