-
Notifications
You must be signed in to change notification settings - Fork 101
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(gprimitives): add NonZeroU256
type & lossy conversion for H160
#4012
Conversation
…ar into vo/gprimitives_nonzero_u256
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.
Where is the implementation of addition, subtraction and other operations for NonZeroU256
? Similar to https://docs.rs/primitive-types/latest/primitive_types/struct.U256.html#trait-implementations
NonZeroU256
typeNonZeroU256
type & lossy conversion for H160
Hi! added implementation of add, sub, mul, pow
Overall, this is a temporary solution until generic NonZero<> stabilizes. |
LGTM!
|
yeah, missed it, looked it when it was 1.78) |
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.
Basically, I'm okay with this impl, but for me it looks a bit like overengineering, so could be merged as is but then simplified in many places
Resolves #3973
Resolves #4020
Resolves #4031
Related to gear-tech/sails#285