@@ -215,7 +215,7 @@ impl BigBitv {
215
215
}
216
216
217
217
#[ deriving( Clone ) ]
218
- enum BitvVariant { Big ( ~ BigBitv ) , Small ( ~ SmallBitv ) }
218
+ enum BitvVariant { Big ( BigBitv ) , Small ( SmallBitv ) }
219
219
220
220
enum Op { Union , Intersect , Assign , Difference }
221
221
@@ -241,20 +241,20 @@ impl Bitv {
241
241
match self . rep {
242
242
Small ( ref mut s) => match other. rep {
243
243
Small ( ref s1) => match op {
244
- Union => s. union ( * s1, self . nbits ) ,
245
- Intersect => s. intersect ( * s1, self . nbits ) ,
246
- Assign => s. become ( * s1, self . nbits ) ,
247
- Difference => s. difference ( * s1, self . nbits )
244
+ Union => s. union ( s1, self . nbits ) ,
245
+ Intersect => s. intersect ( s1, self . nbits ) ,
246
+ Assign => s. become ( s1, self . nbits ) ,
247
+ Difference => s. difference ( s1, self . nbits )
248
248
} ,
249
249
Big ( _) => die ( )
250
250
} ,
251
251
Big ( ref mut s) => match other. rep {
252
252
Small ( _) => die ( ) ,
253
253
Big ( ref s1) => match op {
254
- Union => s. union ( * s1, self . nbits ) ,
255
- Intersect => s. intersect ( * s1, self . nbits ) ,
256
- Assign => s. become ( * s1, self . nbits ) ,
257
- Difference => s. difference ( * s1, self . nbits )
254
+ Union => s. union ( s1, self . nbits ) ,
255
+ Intersect => s. intersect ( s1, self . nbits ) ,
256
+ Assign => s. become ( s1, self . nbits ) ,
257
+ Difference => s. difference ( s1, self . nbits )
258
258
}
259
259
}
260
260
}
@@ -265,14 +265,14 @@ impl Bitv {
265
265
impl Bitv {
266
266
pub fn new ( nbits : uint , init : bool ) -> Bitv {
267
267
let rep = if nbits <= uint:: bits {
268
- Small ( ~ SmallBitv :: new ( if init { !0 } else { 0 } ) )
268
+ Small ( SmallBitv :: new ( if init { !0 } else { 0 } ) )
269
269
}
270
270
else {
271
271
let nelems = nbits/uint:: bits +
272
272
if nbits % uint:: bits == 0 { 0 } else { 1 } ;
273
273
let elem = if init { !0 u} else { 0 u} ;
274
274
let s = vec:: from_elem ( nelems, elem) ;
275
- Big ( ~ BigBitv :: new ( s) )
275
+ Big ( BigBitv :: new ( s) )
276
276
} ;
277
277
Bitv { rep : rep, nbits : nbits}
278
278
}
@@ -341,11 +341,11 @@ impl Bitv {
341
341
if self . nbits != v1. nbits { return false ; }
342
342
match self . rep {
343
343
Small ( ref b) => match v1. rep {
344
- Small ( ref b1) => b. equals ( * b1, self . nbits ) ,
344
+ Small ( ref b1) => b. equals ( b1, self . nbits ) ,
345
345
_ => false
346
346
} ,
347
347
Big ( ref s) => match v1. rep {
348
- Big ( ref s1) => s. equals ( * s1, self . nbits ) ,
348
+ Big ( ref s1) => s. equals ( s1, self . nbits ) ,
349
349
Small ( _) => return false
350
350
}
351
351
}
@@ -614,8 +614,8 @@ impl BitvSet {
614
614
}
615
615
let Bitv { rep, _} = bitv;
616
616
match rep {
617
- Big ( ~ b) => BitvSet { size : size, bitv : b } ,
618
- Small ( ~ SmallBitv { bits} ) =>
617
+ Big ( b) => BitvSet { size : size, bitv : b } ,
618
+ Small ( SmallBitv { bits} ) =>
619
619
BitvSet { size : size, bitv : BigBitv { storage : ~[ bits] } } ,
620
620
}
621
621
}
@@ -628,7 +628,7 @@ impl BitvSet {
628
628
pub fn unwrap ( self ) -> Bitv {
629
629
let cap = self . capacity ( ) ;
630
630
let BitvSet { bitv, _} = self ;
631
- return Bitv { nbits : cap, rep : Big ( ~ bitv) } ;
631
+ return Bitv { nbits : cap, rep : Big ( bitv) } ;
632
632
}
633
633
634
634
#[ inline]
0 commit comments