unsafe fn dense_increase_mx(&mut self, mx: u32) -> &mut [u32] {
        let ptr = self.0;
        let cap = 1 + mx/32 + mx/128;

        let oldcap = (*ptr).cap;
        self.0 = std::alloc::realloc(ptr as *mut u8,
                                     layout_for_capacity(oldcap as usize),
                                     bytes_for_capacity(cap as usize)) as *mut S;
        if self.0 as usize == 0 {
            std::alloc::handle_alloc_error(layout_for_capacity(cap as usize));
        }
        (*self.0).cap = cap;
        (*self.0).sz += 1;
        match self.internal_mut() {
            InternalMut::Dense { a, .. } => {
                for i in oldcap as usize .. a.len() {
                    a[i] = 0;
                }
                a
            }
            _ => unreachable!(),
        }
    }
/// This requires that we currently be a dense! It also requires
/// that we add another element immediately without incrementing
/// sz.
This requires that we currently be a dense. It also requires
that we add another element immediately without incrementing
sz.
This requires that we currently be a dense . It also requires that we add another element immediately without incrementing sz .
unsafe fn dense_increase_mx(&mut self, mx: u32) -> &mut [u32] {
        let ptr = self.0;
        let cap = 1 + mx/32 + mx/128;
        let oldcap = (*ptr).cap;
        self.0 = std::alloc::realloc(ptr as *mut u8,
                                     layout_for_capacity(oldcap as usize),
                                     bytes_for_capacity(cap as usize)) as *mut S;
        if self.0 as usize == 0 {
            std::alloc::handle_alloc_error(layout_for_capacity(cap as usize));
        }
        (*self.0).cap = cap;
        (*self.0).sz += 1;
        match self.internal_mut() {
            InternalMut::Dense { a, .. } => {
                for i in oldcap as usize .. a.len() {
                    a[i] = 0;
                }
                a
            }
            _ => unreachable!(),
        }
    }
unsafe fn dense_increase_mx ( & mut self , mx : u32 ) -> & mut [ u32 ] { let ptr = self . 0 ; let cap = 1 + mx / 32 + mx / 128 ; let oldcap = ( * ptr ) . cap ; self . 0 = std :: alloc :: realloc ( ptr as * mut u8 , layout_for_capacity ( oldcap as usize ) , bytes_for_capacity ( cap as usize ) ) as * mut S ; if self . 0 as usize == 0 { std :: alloc :: handle_alloc_error ( layout_for_capacity ( cap as usize ) ) ; } ( * self . 0 ) . cap = cap ; ( * self . 0 ) . sz += 1 ; match self . internal_mut ( ) { InternalMut :: Dense { a , .. } => { for i in oldcap as usize .. a . len ( ) { a [ i ] = 0 ; } a } _ => unreachable ! ( ) , } }
This requires that we currently be a dense!
This requires that we currently be a dense!
&mut self
mx
u32
&mut self
mx
u32