pub fn epoch_from_tau_vec(tau: &[Bit]) -> Epoch {
    let num_bits = ::std::mem::size_of::<Epoch>() * 8;
    Epoch::from(
        (0..num_bits)
            .rev()
            .zip(tau)
            .fold(0u32, |epoch, (shift, tau)| {
                epoch
                    | ((match *tau {
                        Bit::One => 1,
                        Bit::Zero => 0,
                    }) << shift)
            }),
    )
}
/// Converts an epoch prefix to an epoch by filling in remaining bits with
/// zeros.
Converts an epoch prefix to an epoch by filling in remaining bits with
zeros.
Converts an epoch prefix to an epoch by filling in remaining bits with zeros .
pub fn epoch_from_tau_vec(tau: &[Bit]) -> Epoch {
    let num_bits = ::std::mem::size_of::<Epoch>() * 8;
    Epoch::from(
        (0..num_bits)
            .rev()
            .zip(tau)
            .fold(0u32, |epoch, (shift, tau)| {
                epoch
                    | ((match *tau {
                        Bit::One => 1,
                        Bit::Zero => 0,
                    }) << shift)
            }),
    )
}
pub fn epoch_from_tau_vec ( tau : & [ Bit ] ) -> Epoch { let num_bits = :: std :: mem :: size_of :: < Epoch > ( ) * 8 ; Epoch :: from ( ( 0 .. num_bits ) . rev ( ) . zip ( tau ) . fold ( 0u32 , | epoch , ( shift , tau ) | { epoch | ( ( match * tau { Bit :: One => 1 , Bit :: Zero => 0 , } ) << shift ) } ) , ) }
Converts an epoch prefix to an epoch by filling in remaining bits with
zeros.
Converts an epoch prefix to an epoch by filling in remaining bits with zeros .
tau
&[Bit]
tau
&[Bit]