pub fn push_with(&mut self, new_element: impl FnOnce() -> T) -> &mut T {
        let index = self.len;
        if index >= self.vec.len() {
            self.vec.push(new_element());
        }
        let element = &mut self.vec[index];
        self.len += 1;
        element
    }
/// Pushes an element into the ClearVec by either reusing an unused element
/// or constructing a new one with the closure provided if there is no
/// unused element available.
Pushes an element into the ClearVec by either reusing an unused element
or constructing a new one with the closure provided if there is no
unused element available.
Pushes an element into the ClearVec by either reusing an unused element or constructing a new one with the closure provided if there is no unused element available .
pub fn push_with(&mut self, new_element: impl FnOnce() -> T) -> &mut T {
        let index = self.len;
        if index >= self.vec.len() {
            self.vec.push(new_element());
        }
        let element = &mut self.vec[index];
        self.len += 1;
        element
    }
pub fn push_with ( & mut self , new_element : impl FnOnce ( ) -> T ) -> & mut T { let index = self . len ; if index >= self . vec . len ( ) { self . vec . push ( new_element ( ) ) ; } let element = & mut self . vec [ index ] ; self . len += 1 ; element }
Pushes an element into the ClearVec by either reusing an unused element
or constructing a new one with the closure provided if there is no
unused element available.
Pushes an element into the ClearVec by either reusing an unused element or constructing a new one with the closure provided if there is no unused element available .
&mut self
new_element
impl FnOnce() -> T
&mut self
new_element
impl FnOnce() -> T