about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonas Hietala <tradet.h@gmail.com>2014-07-20 14:16:47 +0200
committerAlex Crichton <alex@alexcrichton.com>2014-07-21 09:54:31 -0700
commit9aaaa6b31e644f174051e30a48ec6fa350e7591d (patch)
tree25b2875d5dfe46b935b3b95a76ab26f97071f68d
parentc86873bda4d0d32a595dbaf24745c1f7cd9b89da (diff)
downloadrust-9aaaa6b31e644f174051e30a48ec6fa350e7591d.tar.gz
rust-9aaaa6b31e644f174051e30a48ec6fa350e7591d.zip
Move in-place functions below their iterator variants.
-rw-r--r--src/libcollections/bitv.rs48
1 files changed, 24 insertions, 24 deletions
diff --git a/src/libcollections/bitv.rs b/src/libcollections/bitv.rs
index 226da13f9e2..094a65b24bb 100644
--- a/src/libcollections/bitv.rs
+++ b/src/libcollections/bitv.rs
@@ -723,30 +723,6 @@ impl BitvSet {
         bitv.nbits = trunc_len * uint::BITS;
     }
 
-    /// Union in-place with the specified other bit vector
-    #[inline]
-    pub fn union_with(&mut self, other: &BitvSet) {
-        self.other_op(other, |w1, w2| w1 | w2);
-    }
-
-    /// Intersect in-place with the specified other bit vector
-    #[inline]
-    pub fn intersect_with(&mut self, other: &BitvSet) {
-        self.other_op(other, |w1, w2| w1 & w2);
-    }
-
-    /// Difference in-place with the specified other bit vector
-    #[inline]
-    pub fn difference_with(&mut self, other: &BitvSet) {
-        self.other_op(other, |w1, w2| w1 & !w2);
-    }
-
-    /// Symmetric difference in-place with the specified other bit vector
-    #[inline]
-    pub fn symmetric_difference_with(&mut self, other: &BitvSet) {
-        self.other_op(other, |w1, w2| w1 ^ w2);
-    }
-
     /// Iterator over each uint stored in the BitvSet
     #[inline]
     pub fn iter<'a>(&'a self) -> BitPositions<'a> {
@@ -801,6 +777,30 @@ impl BitvSet {
             next_idx: 0
         }
     }
+
+    /// Union in-place with the specified other bit vector
+    #[inline]
+    pub fn union_with(&mut self, other: &BitvSet) {
+        self.other_op(other, |w1, w2| w1 | w2);
+    }
+
+    /// Intersect in-place with the specified other bit vector
+    #[inline]
+    pub fn intersect_with(&mut self, other: &BitvSet) {
+        self.other_op(other, |w1, w2| w1 & w2);
+    }
+
+    /// Difference in-place with the specified other bit vector
+    #[inline]
+    pub fn difference_with(&mut self, other: &BitvSet) {
+        self.other_op(other, |w1, w2| w1 & !w2);
+    }
+
+    /// Symmetric difference in-place with the specified other bit vector
+    #[inline]
+    pub fn symmetric_difference_with(&mut self, other: &BitvSet) {
+        self.other_op(other, |w1, w2| w1 ^ w2);
+    }
 }
 
 impl fmt::Show for BitvSet {