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

Reorder ops in LCM to avoid overflow. #167

Merged
merged 1 commit into from
Feb 18, 2016
Merged

Conversation

pnkfelix
Copy link
Contributor

Reorder ops in LCM to avoid overflow.

Fix #166

($t:ty, $x:expr, $y:expr, $r:expr) => { {
let x: $t = $x;
let y: $t = $y;
let (_, o) = x.overflowing_mul(y);
Copy link
Member

Choose a reason for hiding this comment

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

CI failed because 1.0 didn't have overflowing_mul.
How about x.checked_mul(y).is_none()

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(done)

@cuviper
Copy link
Member

cuviper commented Feb 18, 2016

Thanks!

@homu r+ d298262

@homu
Copy link
Contributor

homu commented Feb 18, 2016

⚡ Test exempted - status

@homu homu merged commit d298262 into rust-num:master Feb 18, 2016
homu added a commit that referenced this pull request Feb 18, 2016
Reorder ops in LCM to avoid overflow.

Reorder ops in LCM to avoid overflow.

Fix #166
hauleth added a commit that referenced this pull request Mar 11, 2016
cuviper added a commit that referenced this pull request Mar 26, 2016
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