summaryrefslogtreecommitdiff
path: root/ecs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-02-29 22:01:35 +0100
committerHampusM <hampus@hampusmat.com>2024-02-29 22:01:35 +0100
commit9ef4675ccbd96ecfcf2d93f9eb0439768f967f08 (patch)
tree3c36ee356953769ad57f93fcf998b8041f688291 /ecs
parent99ea5727ca4638efd2979218a128e56c0ce32c44 (diff)
fix(ecs): make Query Comps generic type bound to ComponentSequence
Diffstat (limited to 'ecs')
-rw-r--r--ecs/src/lib.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/ecs/src/lib.rs b/ecs/src/lib.rs
index 3c59554..a9ef2a4 100644
--- a/ecs/src/lib.rs
+++ b/ecs/src/lib.rs
@@ -108,12 +108,16 @@ impl<Event> Default for World<Event>
#[derive(Debug)]
pub struct Query<'world, Comps>
+where
+ Comps: ComponentSequence,
{
component_storage: &'world mut ComponentStorage,
comps_pd: PhantomData<Comps>,
}
impl<'world, Comps> Query<'world, Comps>
+where
+ Comps: ComponentSequence,
{
fn new(component_storage: &'world mut ComponentStorage) -> Self
{