-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add Uint::iszero method #297
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #297 +/- ##
==========================================
- Coverage 80.51% 80.28% -0.23%
==========================================
Files 54 54
Lines 5983 5996 +13
==========================================
- Hits 4817 4814 -3
- Misses 1166 1182 +16
☔ View full report in Codecov by Sentry. |
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.
Thanks for the prompt review! Just update the PR per your comments. Would be great to add support for |
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.
Looking good. I started working on num-traits #298 .
MSRV is set to 1.65 but I'm currently failing CI for 1.65 build for this reason:
Can you adjust the MSRV or fix the dependencies so that I can merge this PR? |
it looks like criterion updated deps in a way that broke our MSRV. We can likely go back and pin the dep version we need cc @DaniPopes to check my beliefs |
Thanks! Borrow @DaniPopes 's idea to fix the 1.65 test with another PR #306 |
Unable to merge the PR yet. All request changes should be resolved but GitHub still asking for requested changes to be addressed. Or do @recmo need to approve explicitly? |
I went ahead and dismissed his review. This is de minimis and his comments were addressed so I'm pretty confident he'll forgive me for merging |
This change is to add the
Uint::iszero() -> bool
method.Motivation
Current workaround is to use
uint_variable.eq(Uint::ZERO)
to check if a Uint variable is zero and is not elegant and straightforward enough.Solution
Add
Uint::iszero() -> bool
PR Checklist