/// Free an index in the pool
Free an index in the pool
Free an index in the pool
pub fn freeidx(&mut self, idx: usize) -> T {
        assert!(idx < self.pool.len());
        self.freelist = idx as isize;
        self.used -= 1;
        match std::mem::replace(&mut self.pool[idx], Slot::Free(self.freelist)) {
            Slot::Alloc(v) => v,
            Slot::Free(_) => panic!("Freeing free entry {}", idx)
        }
    }
pub fn freeidx ( & mut self , idx : usize ) -> T { assert ! ( idx self pool len ( ) ) ; self . freelist = idx as isize ; self . used -= 1 ; match std :: mem :: replace ( & mut self . pool [ idx ] , Slot :: Free ( self . freelist ) ) { Slot :: Alloc ( v ) => v , Slot :: Free ( _ ) => panic ! ( " " idx ) } }
Free an index in the pool
Free an index in the pool
&mut self
idx
usize