Closed
Description
In the documentation for PartialEq
, it mentions that the equality must be symmetric (a == b
implies b == a
) and transitive (a == b
and b == c
implies a == c
) to satisfy the partial equivalence relation.
However, in std::cmp
's documentation, it gives a PartialEq
example for a FuzzyNum
struct, but this does not appear to be transitive. For example, the fuzzy numbers 20 and 24 are equal, 24 and 28 are equal, but 20 and 28 are not equal.
Is there something I'm missing here, or should the example be rewritten?
Metadata
Metadata
Assignees
Labels
No labels