summaryrefslogtreecommitdiff
path: root/ecs/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-08-22 17:45:36 +0200
committerHampusM <hampus@hampusmat.com>2025-08-22 17:45:36 +0200
commit81804a860a082ee50863f78762ed901ed9f9ee28 (patch)
tree8c672aca512fc9c0edc30f1e00a0802569e9cc61 /ecs/src/lib.rs
parente766f6581c2ca8a8963baed11ad29d6e67a0a8a0 (diff)
refactor(ecs): fix clippy lints
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))
}