Skip to content

Rename Bitwise::population_count to Bitwise::count_ones#12331

Closed
brendanzab wants to merge 1 commit intorust-lang:masterfrom
brendanzab:count-ones
Closed

Rename Bitwise::population_count to Bitwise::count_ones#12331
brendanzab wants to merge 1 commit intorust-lang:masterfrom
brendanzab:count-ones

Conversation

@brendanzab
Copy link
Contributor

This is inspired by the function naming in the Julia standard library. It seems like a more self-explanatory name, and is more consistent with the accompanying methods, leading_zeros and trailing_zeros.

@alexcrichton
Copy link
Member

In addition to the rustdoc-test, could you add a unit test for count_zeroes?

Other than that, r=me, nice cleanup!

bors added a commit that referenced this pull request Feb 17, 2014
This is inspired by the [function naming in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones). It seems like a more self-explanatory name, and is more consistent with the accompanying methods, `leading_zeros` and `trailing_zeros`.
@bors bors closed this Feb 17, 2014
@brendanzab brendanzab deleted the count-ones branch February 17, 2014 17:24
@brendanzab brendanzab mentioned this pull request Feb 17, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Feb 26, 2024
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