Closed
Description
Option<T>
where T: Ord
implements Ord
(and similarly for PartialOrd
), but as far as I can see the order it uses isn't documented anywhere. You have to read the source to find out that its Ord
implementation is derive
d, and that None
comes before Some
in the enum
declaration thus None
sorts before Some
. I think that should be documented.
The same issue also appears to apply to Result
.