/// Creates a new bit vector of `len` bits initialized to `value`.
///
/// # Panics
///
/// Panics if `len` is too large. In particular the number of
/// blocks required by the capacity (`len / Block::nbits()`)
/// must fit in a `usize`.
Creates a new bit vector of `len` bits initialized to `value`.
Creates a new bit vector of ` len ` bits initialized to ` value ` .
pub fn with_fill(len: u64, value: bool) -> Self {
        let block_size = Block::checked_ceil_div_nbits(len)
                             .expect("BitVector::with_fill: overflow");
        let block_value = if value {!Block::zero()} else {Block::zero()};
        let mut result = Self::block_with_fill(block_size, block_value);
        result.0.truncate(1, len);
        result
    }
pub fn with_fill ( len : u64 , value : bool ) -> Self { let block_size = Block :: checked_ceil_div_nbits ( len ) . expect ( " " ) ; let block_value = if value { ! Block :: zero ( ) } else { Block :: zero ( ) } ; let mut result = Self :: block_with_fill ( block_size , block_value ) ; result . 0 . truncate ( 1 , len ) ; result }
Creates a new bit vector of `len` bits initialized to `value`.
Creates a new bit vector of ` len ` bits initialized to ` value ` .
len
u64
value
bool
panics
Panics if `len` is too large. In particular the number of
blocks required by the capacity (`len / Block::nbits()`)
must fit in a `usize`.
Panics if ` len ` is too large . In particular the number of blocks required by the capacity ( ` len / Block :: nbits () ` ) must fit in a ` usize ` .