-
Notifications
You must be signed in to change notification settings - Fork 5.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add TotalOrd
library to core::ops
for uint
types
#6635
Conversation
Thanks for the PR! We'll be sure to review this soon, but have been mainnet focused this week |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice, but I'd much rather we get something like Ord
+PartialOrd
, which is only slightly more code to spin up.
Thanks for the feedback, @IGI-111. Just before I make this change. I'd just like to run my understanding by you. Extend this current trait ( I'm a little confused as to where the I would appreciate any help on the above, thank you 🙏 |
Ah yes, it's unfortunate that we already added an What I would prefer is if we can achieve that same level of functionality and have two different traits for total and partial orders. But I suppose that's what your existing code is already trying to achieve with I think we can just merge So really, forget what I said and maybe change the name of the trait to |
ec59067
to
b796462
Compare
cmp
library to std for uint
typesTotalOrd
library to std for uint
types
Thanks for the feedback @IGI-111, I've renamed occurrences of Agree that there is a nice DX gain from maintaining a mapping between Rust. Let me know if you'd like me to capture that future change as an issue. |
TotalOrd
library to std for uint
typesTotalOrd
library to core::ops
for uint
types
Cool, makes sense @IGI-111. Have migrated the trait to |
Will get CI passing in the next day or so. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great! Thank you for the good use of the SRC-2 standard 😁
Description
This PR addresses #6597.
A
cmp
trait has been added that exposes:min(self, Self) -> Self
max(self, Self) -> Self
Checklist
Breaking*
orNew Feature
labels where relevant.