pub fn remove(&mut self, entity: Entity) -> Option<EntityLocation> {
        let block = entity.0.get() / BLOCK_SIZE;
        let idx = (entity.0.get() % BLOCK_SIZE) as usize;
        if let Some(loc) = self.blocks.get_mut(&block).and_then(|v| v.get_mut(idx)) {
            let original = loc.take();
            if original.is_some() {
                self.len -= 1;
            }
            original
        } else {
            None
        }
    }
/// Removes an entity from the location map.
Removes an entity from the location map.
Removes an entity from the location map .
pub fn remove(&mut self, entity: Entity) -> Option<EntityLocation> {
        let block = entity.0.get() / BLOCK_SIZE;
        let idx = (entity.0.get() % BLOCK_SIZE) as usize;
        if let Some(loc) = self.blocks.get_mut(&block).and_then(|v| v.get_mut(idx)) {
            let original = loc.take();
            if original.is_some() {
                self.len -= 1;
            }
            original
        } else {
            None
        }
    }
pub fn remove ( & mut self , entity : Entity ) -> Option < EntityLocation > { let block = entity . 0 . get ( ) / BLOCK_SIZE ; let idx = ( entity . 0 . get ( ) % BLOCK_SIZE ) as usize ; if let Some ( loc ) = self . blocks . get_mut ( & block ) . and_then ( | v | v . get_mut ( idx ) ) { let original = loc . take ( ) ; if original . is_some ( ) { self . len -= 1 ; } original } else { None } }
Removes an entity from the location map.
Removes an entity from the location map .
&mut self
entity
Entity
&mut self
entity
Entity