Skip to content
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 BigInt formatting negative check #4088

Merged
merged 2 commits into from
Aug 27, 2024
Merged

Fix BigInt formatting negative check #4088

merged 2 commits into from
Aug 27, 2024

Conversation

ryangoree
Copy link
Contributor

This is a follow-up to #4082 in which I mistakingly used is_neg for an argument called is_nonnegative.

Comment on lines -1395 to +1397
(self.clone(), false)
} else {
if self < &BigInt::from(0) {
(-self, true)
} else {
(self.clone(), false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I swapped these to make it more readable. Now if the condition is true, then the bool is true.

Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_nonnegative ...
Thank you!

@daxpedda daxpedda merged commit 9d6693a into rustwasm:main Aug 27, 2024
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants