Function bit_struct::bits
source · Expand description
Returns the index of the leading 1 in num
Example:
assert_eq!(bits(2), 2);
assert_eq!(bits(3), 2);
assert_eq!(bits(5), 3);
assert_eq!(bits(32), 6);
Returns the index of the leading 1 in num
Example:
assert_eq!(bits(2), 2);
assert_eq!(bits(3), 2);
assert_eq!(bits(5), 3);
assert_eq!(bits(32), 6);