about summary refs log tree commit diff
path: root/src/libextra
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2013-07-11 21:10:59 -0400
committerDaniel Micay <danielmicay@gmail.com>2013-07-12 01:53:50 -0400
commit2b96408600c33b81c3c41f661764aa8d80cf3c9d (patch)
treee720a03eb6d2c44dd65da00a2d07b901f1a150c9 /src/libextra
parent07183ea6e719e18f5d6b09afbe519c9f940c4705 (diff)
downloadrust-2b96408600c33b81c3c41f661764aa8d80cf3c9d.tar.gz
rust-2b96408600c33b81c3c41f661764aa8d80cf3c9d.zip
extend the iterator tutorial
documents conversion, size hints and double-ended iterators and adds
more of the traits to the prelude
Diffstat (limited to 'src/libextra')
-rw-r--r--src/libextra/bitv.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libextra/bitv.rs b/src/libextra/bitv.rs
index dc65ef36b67..f1637ae96a2 100644
--- a/src/libextra/bitv.rs
+++ b/src/libextra/bitv.rs
@@ -104,7 +104,7 @@ impl SmallBitv {
     }
 
     #[inline]
-    pub fn invert(&mut self) { self.bits = !self.bits; }
+    pub fn negate(&mut self) { self.bits = !self.bits; }
 }
 
 struct BigBitv {
@@ -160,7 +160,7 @@ impl BigBitv {
     }
 
     #[inline]
-    pub fn invert(&mut self) { for self.each_storage |w| { *w = !*w } }
+    pub fn negate(&mut self) { for self.each_storage |w| { *w = !*w } }
 
     #[inline]
     pub fn union(&mut self, b: &BigBitv, nbits: uint) -> bool {
@@ -366,9 +366,9 @@ impl Bitv {
 
     /// Invert all bits
     #[inline]
-    pub fn invert(&mut self) {
+    pub fn negate(&mut self) {
       match self.rep {
-        Small(ref mut b) => b.invert(),
+        Small(ref mut b) => b.negate(),
         Big(ref mut s) => for s.each_storage() |w| { *w = !*w } }
     }