RFC: Add a partial_cmp method to PartialOrd#100
RFC: Add a partial_cmp method to PartialOrd#100alexcrichton merged 2 commits intorust-lang:masterfrom
partial_cmp method to PartialOrd#100Conversation
|
I find it kinda nice that it would bring the The default implementations could always be overridden if performance is necessary, so I wouldn't see the concern of the default implementation providing a possibly slow default being too worrisome. |
|
I'm using |
|
Why not just |
|
@glaebhoerl that is currently 2 bytes. (But implementing an optimisation like rust-lang/rust#14540 would fix that small issue.) |
|
@glaebhoerl oh, that's a good idea. I'm not super concerned about a 1 byte difference in representation size. I can't imagine people storing millions of partial ordering results or anything. I'd prefer to keep an enum around for |
I have the same feeling. Something like |
|
Updated in line with @glaebhoerl's comments. |
|
Here's an example of use of |
|
We decided to accept this RFC, discussed in today's meeting |
No description provided.