diff options
| author | HampusM <hampus@hampusmat.com> | 2026-06-20 16:01:00 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-06-23 00:25:26 +0200 |
| commit | 7b3374ad9585f78c60e1b158126ab54384a83f32 (patch) | |
| tree | ee14cd0bebd6554fab43685da89c459310f0e97d /engine-ecs/src/component.rs | |
| parent | d6cf708a4fd1caf0f2e193ceb7c23fa8e77cc1db (diff) | |
refactor(engine-ecs): store soles as components
Diffstat (limited to 'engine-ecs/src/component.rs')
| -rw-r--r-- | engine-ecs/src/component.rs | 17 |
1 files changed, 2 insertions, 15 deletions
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<ComponentT> IntoParts for ComponentT -where - ComponentT: Component, -{ - fn into_parts(self) -> Parts - { - Parts::builder() - .name(type_name::<Self>()) - .type_reflection(Self::type_reflection()) - .build(Self::id(), self) - } -} - /// The parts of a component. #[derive(Debug)] #[non_exhaustive] |
