diff options
author | HampusM <hampus@hampusmat.com> | 2025-04-07 19:19:31 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-04-07 19:19:31 +0200 |
commit | 9faa8b8f530f3640e1a604a4888cc3fa7beafd5f (patch) | |
tree | 004e75803ac71696db7546676b166875899c58b0 /ecs/src/system/stateful.rs | |
parent | f67ccdd0e10cfde6851610d5d96008c8a0a50ab6 (diff) |
refactor(ecs): remove TypeName trait
Diffstat (limited to 'ecs/src/system/stateful.rs')
-rw-r--r-- | ecs/src/system/stateful.rs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs index 9d911ee..5415cc7 100644 --- a/ecs/src/system/stateful.rs +++ b/ecs/src/system/stateful.rs @@ -1,4 +1,4 @@ -use std::any::{Any, TypeId}; +use std::any::{type_name, Any, TypeId}; use std::panic::{RefUnwindSafe, UnwindSafe}; use hashbrown::HashMap; @@ -127,7 +127,10 @@ macro_rules! impl_system { self.local_components .insert( LocalComponent::id(), - Lock::new(Box::new(local_component)) + Lock::new( + Box::new(local_component), + type_name::<LocalComponent>() + ) ); } } |