summaryrefslogtreecommitdiff
path: root/ecs/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r--ecs/src/lib.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs
index 302fe55..f5fa9f6 100644
--- a/ecs/src/lib.rs
+++ b/ecs/src/lib.rs
@@ -218,9 +218,9 @@ impl World
.component_storage
.get_entity_archetype(entity_id)?;
- let entity = archetype
- .get_entity_by_id(entity_id)
- .expect("Should exist since archetype was found by entity id");
+ let Some(entity) = archetype.get_entity_by_id(entity_id) else {
+ unreachable!("Should exist since archetype was found by entity id");
+ };
Some(EntityHandle::new(archetype, entity))
}