Skip to content
This repository was archived by the owner on Apr 28, 2025. It is now read-only.

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
tgross35 pushed a commit that referenced this pull request Apr 18, 2025
Change `sqrt` to use wrapping newtypes
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants