summaryrefslogtreecommitdiff
path: root/ecs/src/system/stateful.rs
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/system/stateful.rs')
-rw-r--r--ecs/src/system/stateful.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs
index b765ff0..ae6a5b5 100644
--- a/ecs/src/system/stateful.rs
+++ b/ecs/src/system/stateful.rs
@@ -4,7 +4,7 @@ use std::panic::{RefUnwindSafe, UnwindSafe};
use seq_macro::seq;
-use crate::component::Component;
+use crate::component::{Component, Id as ComponentId};
use crate::lock::Lock;
use crate::system::util::check_params_are_compatible;
use crate::system::{
@@ -27,7 +27,7 @@ use crate::WorldData;
pub struct Stateful<Func>
{
func: Func,
- local_components: HashMap<TypeId, Lock<Box<dyn Component>>>,
+ local_components: HashMap<ComponentId, Lock<Box<dyn Component>>>,
}
macro_rules! impl_system {
@@ -134,7 +134,7 @@ macro_rules! impl_system {
) -> Option<ComponentRefMut<LocalComponent>>
{
let local_component = self.local_components
- .get(&TypeId::of::<LocalComponent>())?
+ .get(&ComponentId::of::<LocalComponent>())?
.write_nonblock()
.expect("Failed to aquire read-write local component lock");
@@ -148,7 +148,7 @@ macro_rules! impl_system {
{
self.local_components
.insert(
- TypeId::of::<LocalComponent>(),
+ ComponentId::of::<LocalComponent>(),
Lock::new(Box::new(local_component))
);
}