2 #![allow(non_camel_case_types)]
5 fn to_bytes(&self) -> Vec<u8> ;
9 fn to_bytes(&self) -> Vec<u8> {
14 // the position of this function is significant! - if it comes before methods
15 // then it works, if it comes after it then it doesn't!
16 fn to_bools(bitv: Storage) -> Vec<bool> {
20 let x = 1 & (bitv.storage[w] >> b);
25 struct Storage { storage: Vec<u64> }
28 let bools = vec![false, false, true, false, false, true, true, false];
29 let bools2 = to_bools(Storage{storage: vec![0b01100100]});
32 println!("{} => {} vs {}", i, bools[i], bools2[i]);
35 assert_eq!(bools, bools2);