-
Notifications
You must be signed in to change notification settings - Fork 104
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
Fix: i257
negative zeros
#262
Fix: i257
negative zeros
#262
Conversation
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.
I think that for clarity in error messages you shouldn't use the regular Add
trait of u256
but rather this and use .expect("useful error message")
on the result
done, i think you meant those functions |
No i was referring to the functions i linked ( |
those are clumsier to use, the checked ones allow using expect more directly. unless i completely misunderstood what you wanted to do? |
let (r, overflow) = u256_overflowing_add(lhs, rhs);
let r = r.expect("...."); |
the first returned value i also don't want the overflow value |
@LucasLvy can you check please? |
correct leave that as it is |
Thanks boss |
Pull Request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this introduce a breaking change?
Other information