about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-02-17 10:12:10 +1100
committerBrendan Zabarauskas <bjzaba@yahoo.com.au>2014-02-17 13:55:06 +1100
commit79f52cf9ba20c36860bee8f775498a0880189ac1 (patch)
tree34d366700d281c19ec5b2b2231818b4ad720165e /src/libextra
parent0ba6d4885fc71ca7156e1fe689edb939e1d9d418 (diff)
downloadrust-79f52cf9ba20c36860bee8f775498a0880189ac1.tar.gz
rust-79f52cf9ba20c36860bee8f775498a0880189ac1.zip
Rename Bitwise::population_count to Bitwise::count_ones and add Bitwise::count_zeros
These are inspired by the [functions in the Julia standard library](http://docs.julialang.org/en/release-0.2/stdlib/base/#Base.count_ones).
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/enum_set.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libextra/enum_set.rs b/src/libextra/enum_set.rs
index a17e807b6ee..d036f2c70d7 100644
--- a/src/libextra/enum_set.rs
+++ b/src/libextra/enum_set.rs
@@ -129,7 +129,7 @@ impl<E:CLike> Iterator<E> for Items<E> {
     }
 
     fn size_hint(&self) -> (uint, Option<uint>) {
-        let exact = self.bits.population_count();
+        let exact = self.bits.count_ones();
         (exact, Some(exact))
     }
 }