MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / bit_iter

Function bit_iter

hail-fuzz/src/coverage.rs:55–61  ·  view source on GitHub ↗

Returns an iterator of the bit index of all the bits in `array)

(array: &[u64])

Source from the content-addressed store, hash-verified

53
54/// Returns an iterator of the bit index of all the bits in `array)
55pub(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]

Callers 3

runMethod · 0.85
check_exit_stateMethod · 0.85
get_blocksMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected