test_bit(bitset: &[u32], bit: u32) -> bool1 pub fn test_bit(bitset: &[u32], bit: u32) -> bool { 2 let idx = bit / 32; 3 let test = bit % 32; 4 5 bitset[idx as usize] & (1 << test) != 0 6 } 7