[][src]Function bit_mask_ring_buf::next_pow_of_2

pub fn next_pow_of_2(n: usize) -> usize

Returns the next highest power of 2 if n is not already a power of 2. This will return 2 if n < 2.

Panics

  • This will panic if n > (std::usize::MAX/2)+1