Skip to content

Commit a62e7f5

Browse files
committed
Move in-place functions below their iterator variants.
1 parent cb2b5c4 commit a62e7f5

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

src/libcollections/bitv.rs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -723,30 +723,6 @@ impl BitvSet {
723723
bitv.nbits = trunc_len * uint::BITS;
724724
}
725725

726-
/// Union in-place with the specified other bit vector
727-
#[inline]
728-
pub fn union_with(&mut self, other: &BitvSet) {
729-
self.other_op(other, |w1, w2| w1 | w2);
730-
}
731-
732-
/// Intersect in-place with the specified other bit vector
733-
#[inline]
734-
pub fn intersect_with(&mut self, other: &BitvSet) {
735-
self.other_op(other, |w1, w2| w1 & w2);
736-
}
737-
738-
/// Difference in-place with the specified other bit vector
739-
#[inline]
740-
pub fn difference_with(&mut self, other: &BitvSet) {
741-
self.other_op(other, |w1, w2| w1 & !w2);
742-
}
743-
744-
/// Symmetric difference in-place with the specified other bit vector
745-
#[inline]
746-
pub fn symmetric_difference_with(&mut self, other: &BitvSet) {
747-
self.other_op(other, |w1, w2| w1 ^ w2);
748-
}
749-
750726
/// Iterator over each uint stored in the BitvSet
751727
#[inline]
752728
pub fn iter<'a>(&'a self) -> BitPositions<'a> {
@@ -801,6 +777,30 @@ impl BitvSet {
801777
next_idx: 0
802778
}
803779
}
780+
781+
/// Union in-place with the specified other bit vector
782+
#[inline]
783+
pub fn union_with(&mut self, other: &BitvSet) {
784+
self.other_op(other, |w1, w2| w1 | w2);
785+
}
786+
787+
/// Intersect in-place with the specified other bit vector
788+
#[inline]
789+
pub fn intersect_with(&mut self, other: &BitvSet) {
790+
self.other_op(other, |w1, w2| w1 & w2);
791+
}
792+
793+
/// Difference in-place with the specified other bit vector
794+
#[inline]
795+
pub fn difference_with(&mut self, other: &BitvSet) {
796+
self.other_op(other, |w1, w2| w1 & !w2);
797+
}
798+
799+
/// Symmetric difference in-place with the specified other bit vector
800+
#[inline]
801+
pub fn symmetric_difference_with(&mut self, other: &BitvSet) {
802+
self.other_op(other, |w1, w2| w1 ^ w2);
803+
}
804804
}
805805

806806
impl fmt::Show for BitvSet {

0 commit comments

Comments
 (0)