summaryrefslogtreecommitdiff
path: root/ecs/src/lib.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-05-24 19:00:38 +0200
committerHampusM <hampus@hampusmat.com>2024-05-24 19:11:11 +0200
commitb8417d20765755cfa2cecacb11c77e3abbafd546 (patch)
tree5f62502eeb846faba66bd204f8dc028ef5f7aa5e /ecs/src/lib.rs
parent36886e343781bf0ddf7458d5c6db5b5724c918e4 (diff)
fix(ecs): prevent unnecessary locking in Sequence::from_components
Diffstat (limited to 'ecs/src/lib.rs')
-rw-r--r--ecs/src/lib.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs
index c2fc9c7..fbcc451 100644
--- a/ecs/src/lib.rs
+++ b/ecs/src/lib.rs
@@ -44,11 +44,12 @@ struct Entity
}
#[derive(Debug)]
-struct EntityComponent
+#[non_exhaustive]
+pub struct EntityComponent
{
- id: TypeId,
- component: Lock<Box<dyn Component>>,
- drop_last: bool,
+ pub id: TypeId,
+ pub component: Lock<Box<dyn Component>>,
+ pub drop_last: bool,
}
#[derive(Debug, Default)]