1 2 3 4 5 6
use crate::Buffer; pub(crate) fn mask<B: Buffer>(size: u32) -> B { debug_assert!(size <= B::BITS); B::MAX >> (B::BITS - size) }