summaryrefslogtreecommitdiff
path: root/ecs/src/system
diff options
context:
space:
mode:
Diffstat (limited to 'ecs/src/system')
-rw-r--r--ecs/src/system/stateful.rs22
1 files changed, 1 insertions, 21 deletions
diff --git a/ecs/src/system/stateful.rs b/ecs/src/system/stateful.rs
index dd0c5e1..99b56c1 100644
--- a/ecs/src/system/stateful.rs
+++ b/ecs/src/system/stateful.rs
@@ -21,7 +21,7 @@ use crate::tuple::{
TakeOptionElementResult as TupleTakeOptionElementResult,
WithOptionElements as TupleWithOptionElements,
};
-use crate::{World, WorldData};
+use crate::World;
/// A stateful system.
pub struct Stateful<Func>
@@ -85,13 +85,6 @@ macro_rules! impl_system {
self
}
- fn prepare(&self, world_data: &WorldData)
- {
- #(
- TParam~I::prepare(world_data);
- )*
- }
-
fn run<'this>(&'this self, world: &'world World)
where
'this: 'world
@@ -124,19 +117,6 @@ macro_rules! impl_system {
me.run(world);
}),
- prepare: Box::new(|data, world| {
- // SAFETY: The caller of TypeErased::run ensures the lifetime
- // is correct
- let data = unsafe { &*std::ptr::from_ref::<dyn Any>(data) };
-
- let me = data.downcast_ref::<Self>().unwrap();
-
- // SAFETY: The caller of TypeErased::run ensures the lifetime
- // is correct
- let world = unsafe { &*std::ptr::from_ref(world) };
-
- me.prepare(world);
- }),
}
}