Function bits_to_uint
pub fn bits_to_uint<#uint N>(input: [bool; N]) -> uint<N>Expand
Casts an array of bool to an unsigned integer by reinterpreting its bits.
Bits are laid out from LSB to MSB, so the first element of the array corresponds to the LSB of the input number and the last element corresponds to its MSB.
Note that bits in the literal binary representation of the number are written right-to-left, while items in the literal representation of the array are written left-to-right.
Examples
assert bits_to_uint([]) == 0u0;
assert bits_to_uint([true, false, true, true]) == 0b1101u4;