Returns an iterator of the bit index of all the bits in `array)
(array: &[u64])
| 53 | |
| 54 | /// Returns an iterator of the bit index of all the bits in `array) |
| 55 | pub(crate) fn bit_iter(array: &[u64]) -> impl Iterator<Item = usize> + '_ { |
| 56 | array.iter().enumerate().flat_map(move |(byte_offset, &byte)| { |
| 57 | (0..u64::BITS) |
| 58 | .filter(move |bit| (byte & (1 << bit)) != 0) |
| 59 | .map(move |bit| byte_offset * 64 + (bit as usize)) |
| 60 | }) |
| 61 | } |
| 62 | |
| 63 | /// Check whether `new` contains any bits not set in `existing`. |
| 64 | #[inline] |
no outgoing calls
no test coverage detected