File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
- refs/heads/try: 9423302c82b0974315c7f2637f72c00ab3c26a18
5
+ refs/heads/try: 5ccd299b15e2ff5d351e0329df6e75dec2eb1b6b
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
Original file line number Diff line number Diff line change @@ -61,7 +61,7 @@ struct small_bitv {
61
61
self . bits |= 1 <<i;
62
62
}
63
63
else {
64
- self . bits &= !( i as u32 ) ;
64
+ self . bits &= !( 1 << i as u32 ) ;
65
65
}
66
66
}
67
67
#[ inline( always) ]
@@ -456,6 +456,14 @@ mod tests {
456
456
assert act. eq_vec ( ~[ 1 u] ) ;
457
457
}
458
458
459
+ #[ test]
460
+ fn test_2_elements ( ) {
461
+ let b = bitv:: bitv ( 2 , false ) ;
462
+ b. set ( 0 , true ) ;
463
+ b. set ( 1 , false ) ;
464
+ assert b. to_str ( ) == ~"10 ";
465
+ }
466
+
459
467
#[ test]
460
468
fn test_10_elements ( ) {
461
469
let mut act;
You can’t perform that action at this time.
0 commit comments