summaryrefslogtreecommitdiff
path: root/ecs/src/component/storage
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/component/storage
parente766f6581c2ca8a8963baed11ad29d6e67a0a8a0 (diff)
refactor(ecs): fix clippy lints
Diffstat (limited to 'ecs/src/component/storage')
-rw-r--r--ecs/src/component/storage/archetype.rs9
1 files changed, 4 insertions, 5 deletions
diff --git a/ecs/src/component/storage/archetype.rs b/ecs/src/component/storage/archetype.rs
index 8e1ff05..788794a 100644
--- a/ecs/src/component/storage/archetype.rs
+++ b/ecs/src/component/storage/archetype.rs
@@ -370,11 +370,10 @@ impl Id
}
for comp_id in component_id_iter {
- if prev_component_id.is_some_and(|prev_comp_id| *comp_id < prev_comp_id) {
- panic!(
- "Cannot create archetype ID from a unsorted component metadata list"
- );
- }
+ assert!(
+ prev_component_id.is_none_or(|prev_comp_id| *comp_id >= prev_comp_id),
+ "Cannot create archetype ID from a unsorted component metadata list"
+ );
prev_component_id = Some(*comp_id);