summaryrefslogtreecommitdiff
path: root/ecs/src/entity.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2025-06-07 20:23:34 +0200
committerHampusM <hampus@hampusmat.com>2025-06-07 20:23:34 +0200
commitaeed1b1ff3e34fe719a2f7e6097584b99a673ded (patch)
tree98158913fa3d1482358a21426bcbbf4312afe02f /ecs/src/entity.rs
parentcaf56d34449b471169b7c71eddabad230449dfe3 (diff)
refactor(ecs): make entity::Handle not hold world reference
Diffstat (limited to 'ecs/src/entity.rs')
-rw-r--r--ecs/src/entity.rs9
1 files changed, 2 insertions, 7 deletions
diff --git a/ecs/src/entity.rs b/ecs/src/entity.rs
index 196bd01..4496a2b 100644
--- a/ecs/src/entity.rs
+++ b/ecs/src/entity.rs
@@ -19,7 +19,6 @@ use crate::{EntityComponentRef, World};
#[derive(Debug)]
pub struct Handle<'a>
{
- _world: &'a World,
archetype: &'a Archetype,
entity: &'a ArchetypeEntity,
}
@@ -97,13 +96,9 @@ impl<'a> Handle<'a>
}
}
- pub(crate) fn new(
- world: &'a World,
- archetype: &'a Archetype,
- entity: &'a ArchetypeEntity,
- ) -> Self
+ pub(crate) fn new(archetype: &'a Archetype, entity: &'a ArchetypeEntity) -> Self
{
- Self { _world: world, archetype, entity }
+ Self { archetype, entity }
}
}