From 892364927aee7997080e5525a93a07ee4bf94f63 Mon Sep 17 00:00:00 2001 From: Timothy Warren Date: Wed, 19 Jan 2022 14:48:10 -0500 Subject: [PATCH] Fix some lint issues --- src/spatial.rs | 1 + src/trigger_system.rs | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/spatial.rs b/src/spatial.rs index 45a1eed..3198006 100644 --- a/src/spatial.rs +++ b/src/spatial.rs @@ -120,6 +120,7 @@ pub fn move_entity(entity: Entity, moving_from: usize, moving_to: usize) { lock.blocked[moving_to].1 = to_blocked; } +#[allow(dead_code)] pub fn remove_entity(entity: Entity, idx: usize) { let mut lock = SPATIAL_MAP.lock().unwrap(); lock.tile_content[idx].retain(|(e, _)| *e != entity); diff --git a/src/trigger_system.rs b/src/trigger_system.rs index 6299424..b9e4c74 100644 --- a/src/trigger_system.rs +++ b/src/trigger_system.rs @@ -89,9 +89,7 @@ impl<'a> System<'a> for TriggerSystem { // If it's a teleporter, then do that if let Some(teleport) = teleporters.get(entity_id) { - if (teleport.player_only && entity == *player_entity) - || !teleport.player_only - { + if !teleport.player_only || entity == *player_entity { apply_teleport .insert( entity,