Skip to content

Use checked_next_power_of_two from std instead of custom method #889

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

Merged
merged 1 commit into from
Mar 29, 2016

Conversation

kamalmarhubi
Copy link
Contributor

NB The custom method returned 0 on an input of 0, which is arguably
incorrect: 0 is not a power of two; the method in std returns 1 in
that case.

NB The custom method returned 0 on an input of 0, which is arguably
incorrect: 0 is not a power of two; the method in `std` returns 1 in
that case.
@nrc
Copy link
Member

nrc commented Mar 29, 2016

Thanks, I kept meaning to make this change and never got round to it :-)

@nrc nrc merged commit d3b18d0 into rust-lang:master Mar 29, 2016
@kamalmarhubi kamalmarhubi deleted the next-power-of-two branch April 1, 2016 20:40
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