From 2b96408600c33b81c3c41f661764aa8d80cf3c9d Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Thu, 11 Jul 2013 21:10:59 -0400 Subject: extend the iterator tutorial documents conversion, size hints and double-ended iterators and adds more of the traits to the prelude --- src/libextra/bitv.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/libextra') 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 } } } -- cgit 1.4.1-3-g733a5