-
Notifications
You must be signed in to change notification settings - Fork 13.9k
Closed
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.
Milestone
Description
Updated description
The target end point: https://gist.github.com/alexcrichton/10945968
Original issue
- rename
Ord->PartialOrd - rename
TotalOrd->Ord - rename
Eq->PartialEq - rename
TotalEq->Eq -
PartialOrdinherits fromPartialEq -
Ordinherits fromEq -
Ordinherits fromPartialOrd -
Eqinherits fromPartialEq - remove
equalsmethod (TotalEqderiving needs to be redone) - deriving
Ordalso derivesPartialOrd - deriving
Eqalso derivesPartialEq
An implementation of Eq will simply mean that the PartialEq implementation provides equivalence rather than partial equivalence. An Ord implementation will add a single cmp method and the guarantee of the PartialOrd implementation providing a total order.
This allows code generic over Float to use the operators, since it will inherit from PartialEq and PartialOrd. Code generic over Eq and Ord will also be able to use the operators, despite not being designed to handle a partial order.
Metadata
Metadata
Assignees
Labels
C-cleanupCategory: PRs that clean code up or issues documenting cleanup.Category: PRs that clean code up or issues documenting cleanup.