@@ -164,22 +164,22 @@ impl BigBitv {
164
164
165
165
#[ inline( always) ]
166
166
fn union ( & mut self , b : & BigBitv , nbits : uint ) -> bool {
167
- self . process ( b, nbits, lor )
167
+ self . process ( b, nbits, |w1 , w2| w1 | w2 )
168
168
}
169
169
170
170
#[ inline( always) ]
171
171
fn intersect ( & mut self , b : & BigBitv , nbits : uint ) -> bool {
172
- self . process ( b, nbits, land )
172
+ self . process ( b, nbits, |w1 , w2| w1 & w2 )
173
173
}
174
174
175
175
#[ inline( always) ]
176
176
fn become ( & mut self , b : & BigBitv , nbits : uint ) -> bool {
177
- self . process ( b, nbits, right )
177
+ self . process ( b, nbits, |_ , w| w )
178
178
}
179
179
180
180
#[ inline( always) ]
181
181
fn difference ( & mut self , b : & BigBitv , nbits : uint ) -> bool {
182
- self . process ( b, nbits, difference )
182
+ self . process ( b, nbits, |w1 , w2| w1 & !w2 )
183
183
}
184
184
185
185
#[ inline( always) ]
@@ -556,13 +556,9 @@ pub fn from_fn(len: uint, f: fn(index: uint) -> bool) -> Bitv {
556
556
bitv
557
557
}
558
558
559
- pure fn lor(w0: uint, w1: uint) -> uint { return w0 | w1; }
560
559
561
- pure fn land(w0: uint, w1: uint) -> uint { return w0 & w1; }
562
560
563
- pure fn difference(w0: uint, w1: uint) -> uint { return w0 & !w1; }
564
561
565
- pure fn right(_w0: uint, w1: uint) -> uint { return w1; }
566
562
567
563
impl ops::Index<uint,bool> for Bitv {
568
564
pure fn index(&self, i: uint) -> bool {
0 commit comments