pub fn clear(&mut self) {
        unsafe {
            // Clear the last chunk, which is partially filled.
            let mut chunks_borrow = self.chunks.borrow_mut();
            if let Some(mut last_chunk) = chunks_borrow.pop() {
                self.clear_last_chunk(&mut last_chunk);
                // If `T` is ZST, code below has no effect.
                for mut chunk in chunks_borrow.drain(..) {
                    let cap = chunk.storage.cap();
                    chunk.destroy(cap);
                }
                chunks_borrow.push(last_chunk);
            }
        }
    }
/// Clears the arena. Deallocates all but the longest chunk which may be reused.
Clears the arena. Deallocates all but the longest chunk which may be reused.
Clears the arena . Deallocates all but the longest chunk which may be reused .
pub fn clear(&mut self) {
        unsafe {
            // Clear the last chunk, which is partially filled.
            let mut chunks_borrow = self.chunks.borrow_mut();
            if let Some(mut last_chunk) = chunks_borrow.pop() {
                self.clear_last_chunk(&mut last_chunk);
                // If `T` is ZST, code below has no effect.
                for mut chunk in chunks_borrow.drain(..) {
                    let cap = chunk.storage.cap();
                    chunk.destroy(cap);
                }
                chunks_borrow.push(last_chunk);
            }
        }
    }
pub fn clear ( & mut self ) { unsafe { // Clear the last chunk, which is partially filled. let mut chunks_borrow = self . chunks . borrow_mut ( ) ; if let Some ( mut last_chunk ) = chunks_borrow . pop ( ) { self . clear_last_chunk ( & mut last_chunk ) ; // If `T` is ZST, code below has no effect. for mut chunk in chunks_borrow . drain ( .. ) { let cap = chunk . storage . cap ( ) ; chunk . destroy ( cap ) ; } chunks_borrow . push ( last_chunk ) ; } } }
Clears the arena.
Clears the arena .
&mut self
&mut self