diff options
| author | HampusM <hampus@hampusmat.com> | 2026-12-01 17:42:12 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-12-01 17:42:12 +0100 |
| commit | b2a130a6e30b82a7e0f80347f916265a467a4238 (patch) | |
| tree | 5685399d1cf7a28df3f91e83a2d3d2eaf2eaa20b /engine-ecs/src/lib.rs | |
| parent | 8985ff5080c34cf4b07b814ed7a757311a5a332f (diff) | |
Diffstat (limited to 'engine-ecs/src/lib.rs')
| -rw-r--r-- | engine-ecs/src/lib.rs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/engine-ecs/src/lib.rs b/engine-ecs/src/lib.rs index ee2dca6..44c7aa0 100644 --- a/engine-ecs/src/lib.rs +++ b/engine-ecs/src/lib.rs @@ -20,7 +20,6 @@ use crate::component::storage::{ use crate::component::{ Component, Info as ComponentInfo, - IntoParts as IntoComponentParts, Parts as ComponentParts, WithAssociatedId, }; @@ -198,7 +197,7 @@ impl World self.create_ent( entity_uid, - components_parts.chain([EntityName { name: name.into() }.into_parts()]), + components_parts.chain([EntityName { name: name.into() }.into()]), &ComponentAddingFlags { allow_soles: false }, ); } @@ -249,9 +248,9 @@ impl World self.create_ent( SoleT::id(), [ - sole.into_parts(), - EntityName { name: SoleT::name() }.into_parts(), - crate::sole::Is.into_parts(), + sole.into(), + EntityName { name: SoleT::name() }.into(), + crate::sole::Is.into(), ], &ComponentAddingFlags { allow_soles: true }, ); @@ -271,11 +270,9 @@ impl World self.create_ent( ent_id, - [SystemFunction { system }.into_parts()].into_iter().chain( - ObserverT::observed_events() - .into_iter() - .map(IntoComponentParts::into_parts), - ), + [SystemFunction { system }.into()] + .into_iter() + .chain(ObserverT::observed_events().into_iter().map(Into::into)), &ComponentAddingFlags { allow_soles: false }, ); @@ -636,8 +633,8 @@ impl World sole_parts.id, [ sole_parts, - EntityName { name: name.into() }.into_parts(), - crate::sole::Is.into_parts(), + EntityName { name: name.into() }.into(), + crate::sole::Is.into(), ], &mut self.data.component_storage, &EventSubmitter::new(&self.data.new_events), @@ -753,7 +750,7 @@ impl World unreachable!(); } - let comp_info_parts = comp_info.into_parts(); + let comp_info_parts = ComponentParts::from(comp_info); match component_storage .add_entity_component(comp_id, (comp_info_parts.id, comp_info_parts.data)) |
