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

Change sqrt to use wrapping newtypes #142

Merged
merged 1 commit into from
May 2, 2019

Conversation

mb64
Copy link
Contributor

@mb64 mb64 commented Aug 1, 2018

This changes the sqrt implementation to use the Wrapping newtype around the u32s to make it not panic on overflows. This seems to be enough to make sqrt work with overflow checks enabled.

Helps #4.

@little-arhat
Copy link

@japaric hi, any plans on merging this one and related PRs?

@alexcrichton
Copy link
Member

Sorry for the very long delay on merging this but looks like this still passes tests (yay!) so I'm going to merge

@alexcrichton alexcrichton merged commit 77a4032 into rust-lang:master May 2, 2019
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.

3 participants