From 7b3374ad9585f78c60e1b158126ab54384a83f32 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 20 Jun 2026 16:01:00 +0200 Subject: refactor(engine-ecs): store soles as components --- engine-ecs/src/component.rs | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) (limited to 'engine-ecs/src/component.rs') diff --git a/engine-ecs/src/component.rs b/engine-ecs/src/component.rs index 157d79c..25ec101 100644 --- a/engine-ecs/src/component.rs +++ b/engine-ecs/src/component.rs @@ -1,4 +1,4 @@ -use std::any::{type_name, Any}; +use std::any::Any; use std::fmt::Debug; use std::ops::{Deref, DerefMut}; @@ -24,7 +24,7 @@ pub mod local; pub(crate) mod storage; -pub trait Component: SystemInput + Any +pub trait Component: SystemInput + Any + IntoParts { /// Returns the ID of this component. fn id() -> Uid @@ -286,19 +286,6 @@ pub trait IntoParts fn into_parts(self) -> Parts; } -impl IntoParts for ComponentT -where - ComponentT: Component, -{ - fn into_parts(self) -> Parts - { - Parts::builder() - .name(type_name::()) - .type_reflection(Self::type_reflection()) - .build(Self::id(), self) - } -} - /// The parts of a component. #[derive(Debug)] #[non_exhaustive] -- cgit v1.2.3-18-g5258