pub fn remove(&mut self, handle: Idx) -> Option<T>
    where
        Idx: Into<ContiguousArenaIndex>,
    {
        let i = self.indices.remove(handle.into())?;
        let swapped_rev_id = self.rev_indices.last().cloned();
        let deleted_object = self.objects.swap_remove(i);
        let _ = self.rev_indices.swap_remove(i);

        if let Some(rev_id) = swapped_rev_id {
            if let Some(indice) = self.indices.get_mut(rev_id) {
                *indice = i;
            }
        }

        Some(deleted_object)
    }
/// Remove an object from this set.
Remove an object from this set.
Remove an object from this set .
pub fn remove(&mut self, handle: Idx) -> Option<T>
    where
        Idx: Into<ContiguousArenaIndex>,
    {
        let i = self.indices.remove(handle.into())?;
        let swapped_rev_id = self.rev_indices.last().cloned();
        let deleted_object = self.objects.swap_remove(i);
        let _ = self.rev_indices.swap_remove(i);
        if let Some(rev_id) = swapped_rev_id {
            if let Some(indice) = self.indices.get_mut(rev_id) {
                *indice = i;
            }
        }
        Some(deleted_object)
    }
pub fn remove ( & mut self , handle : Idx ) -> Option < T > where Idx : Into < ContiguousArenaIndex > , { let i = self . indices . remove ( handle . into ( ) ) ? ; let swapped_rev_id = self . rev_indices . last ( ) . cloned ( ) ; let deleted_object = self . objects . swap_remove ( i ) ; let _ = self . rev_indices . swap_remove ( i ) ; if let Some ( rev_id ) = swapped_rev_id { if let Some ( indice ) = self . indices . get_mut ( rev_id ) { * indice = i ; } } Some ( deleted_object ) }
Remove an object from this set.
Remove an object from this set .
&mut self
handle
Idx
&mut self
handle
Idx