pub fn push(&mut self) -> (*mut u8, ArenaIndex) {
        // Make sure the item can fit in the current chunk
        if (*self.len + 1) > self.chunks.len() * self.items_per_chunk() {
            // If not, create a new chunk
            self.chunks
                .push(self.storage.create_chunk(self.ident.sub(*self.len), self.chunk_size));
        }
        let offset = (*self.len % self.items_per_chunk()) * self.item_size;
        let index = ArenaIndex(*self.len);
        *self.len += 1;
        unsafe {
            (
                self.chunks.last_mut().unwrap().as_mut_ptr().offset(offset as isize),
                index,
            )
        }
    }
/// Allocate space for a new item, returns a pointer to where the new item
/// can be written to and the index that the new item will have.
///
/// This is handled like this so items of heterogeneous types or sizes less
/// than the fixed item size can be added to the collection.
Allocate space for a new item, returns a pointer to where the new item
can be written to and the index that the new item will have.

This is handled like this so items of heterogeneous types or sizes less
than the fixed item size can be added to the collection.
Allocate space for a new item returns a pointer to where the new item can be written to and the index that the new item will have . This is handled like this so items of heterogeneous types or sizes less than the fixed item size can be added to the collection .
pub fn push(&mut self) -> (*mut u8, ArenaIndex) {
        // Make sure the item can fit in the current chunk
        if (*self.len + 1) > self.chunks.len() * self.items_per_chunk() {
            // If not, create a new chunk
            self.chunks
                .push(self.storage.create_chunk(self.ident.sub(*self.len), self.chunk_size));
        }
        let offset = (*self.len % self.items_per_chunk()) * self.item_size;
        let index = ArenaIndex(*self.len);
        *self.len += 1;
        unsafe {
            (
                self.chunks.last_mut().unwrap().as_mut_ptr().offset(offset as isize),
                index,
            )
        }
    }
pub fn push ( & mut self ) -> ( * mut u8 , ArenaIndex ) { // Make sure the item can fit in the current chunk if ( * self . len + 1 ) > self . chunks . len ( ) * self . items_per_chunk ( ) { // If not, create a new chunk self . chunks . push ( self . storage . create_chunk ( self . ident . sub ( * self . len ) , self . chunk_size ) ) ; } let offset = ( * self . len % self . items_per_chunk ( ) ) * self . item_size ; let index = ArenaIndex ( * self . len ) ; * self . len += 1 ; unsafe { ( self . chunks . last_mut ( ) . unwrap ( ) . as_mut_ptr ( ) . offset ( offset as isize ) , index , ) } }
Allocate space for a new item, returns a pointer to where the new item
can be written to and the index that the new item will have.
Allocate space for a new item returns a pointer to where the new item can be written to and the index that the new item will have .
&mut self
&mut self