diff options
| author | HampusM <hampus@hampusmat.com> | 2026-11-29 21:16:11 +0100 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-11-29 21:16:11 +0100 |
| commit | 3c117bcd9455ffbcec5cd59dab37db0786e15e02 (patch) | |
| tree | 0355ba259b51b3d5c9eb7c74cf395461517231fa /engine-ecs/src/sole.rs | |
| parent | c416eca3cccac2c25ee395469005faca01fdb912 (diff) | |
feat(engine-ecs): change meaning of component name to type identifier
Diffstat (limited to 'engine-ecs/src/sole.rs')
| -rw-r--r-- | engine-ecs/src/sole.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/engine-ecs/src/sole.rs b/engine-ecs/src/sole.rs index cf5283b..ee1da7a 100644 --- a/engine-ecs/src/sole.rs +++ b/engine-ecs/src/sole.rs @@ -1,4 +1,5 @@ use std::any::{type_name, Any}; +use std::borrow::Cow; use std::fmt::Debug; use crate::component::{ @@ -17,7 +18,7 @@ pub trait Sole: Any + IntoComponentParts + ComponentWithAssociatedId Self: Sized; /// Returns the name of this component. - fn name(&self) -> &'static str; + fn name() -> Cow<'static, str>; } /// Marker component for the entities of soles. |
