From a86d011d4ae869128dd404535f8d377c3a5e4c18 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 13 Jan 2025 06:10:55 +0000 Subject: change some warnings to debug logs and improve some entity id index code --- azalea-entity/src/plugin/indexing.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'azalea-entity/src/plugin') diff --git a/azalea-entity/src/plugin/indexing.rs b/azalea-entity/src/plugin/indexing.rs index c4879c4f..f1105d89 100644 --- a/azalea-entity/src/plugin/indexing.rs +++ b/azalea-entity/src/plugin/indexing.rs @@ -61,20 +61,20 @@ impl EntityUuidIndex { } impl EntityIdIndex { - pub fn get(&self, id: &MinecraftEntityId) -> Option { - self.entity_by_id.get(id).copied() + pub fn get(&self, id: MinecraftEntityId) -> Option { + self.entity_by_id.get(&id).copied() } - pub fn contains_key(&self, id: &MinecraftEntityId) -> bool { - self.entity_by_id.contains_key(id) + pub fn contains_key(&self, id: MinecraftEntityId) -> bool { + self.entity_by_id.contains_key(&id) } pub fn insert(&mut self, id: MinecraftEntityId, entity: Entity) { self.entity_by_id.insert(id, entity); } - pub fn remove(&mut self, id: &MinecraftEntityId) -> Option { - self.entity_by_id.remove(id) + pub fn remove(&mut self, id: MinecraftEntityId) -> Option { + self.entity_by_id.remove(&id) } } -- cgit v1.2.3