Skip to content

Commit 329940a

Browse files
committed
Place union as the first function, for consistency.
1 parent a62e7f5 commit 329940a

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/libcollections/bitv.rs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,18 @@ impl BitvSet {
729729
BitPositions {set: self, next_idx: 0}
730730
}
731731

732+
/// Iterator over each uint stored in `self` union `other`
733+
#[inline]
734+
pub fn union<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
735+
TwoBitPositions {
736+
set: self,
737+
other: other,
738+
merge: |w1, w2| w1 | w2,
739+
current_word: 0,
740+
next_idx: 0
741+
}
742+
}
743+
732744
/// Iterator over each uint stored in the `self` setminus `other`
733745
#[inline]
734746
pub fn difference<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
@@ -766,18 +778,6 @@ impl BitvSet {
766778
}.take(min)
767779
}
768780

769-
/// Iterator over each uint stored in `self` union `other`
770-
#[inline]
771-
pub fn union<'a>(&'a self, other: &'a BitvSet) -> TwoBitPositions<'a> {
772-
TwoBitPositions {
773-
set: self,
774-
other: other,
775-
merge: |w1, w2| w1 | w2,
776-
current_word: 0,
777-
next_idx: 0
778-
}
779-
}
780-
781781
/// Union in-place with the specified other bit vector
782782
#[inline]
783783
pub fn union_with(&mut self, other: &BitvSet) {

0 commit comments

Comments
 (0)