Lines
83.33 %
Functions
50 %
Branches
100 %
/// Returns the number of bits needed to represent the given value.
pub fn bits_for_value(value: usize) -> u8 {
if value == 0 {
return 1;
}
value.ilog2() as u8 + 1