Fix use_system()

This commit is contained in:
JMS55 2023-12-10 16:14:35 -08:00
parent d96aca59af
commit 52da5428fb
2 changed files with 4 additions and 4 deletions

View File

@ -28,9 +28,9 @@ impl DeferredSystem {
unsafe impl Send for DeferredSystem {}
unsafe impl Sync for DeferredSystem {}
pub fn new_deferred_system<S>(system: S, world: &mut World) -> (DeferredSystem, Arc<()>)
pub fn new_deferred_system<S, M>(system: S, world: &mut World) -> (DeferredSystem, Arc<()>)
where
S: IntoSystem<(), (), ()> + 'static,
S: IntoSystem<(), (), M> + 'static,
{
let id = world.register_system(system);
let ref_count = Arc::new(());

View File

@ -38,9 +38,9 @@ where
}
}
pub fn use_system<S>(cx: &ScopeState, system: S) -> DeferredSystem
pub fn use_system<S, M>(cx: &ScopeState, system: S) -> DeferredSystem
where
S: IntoSystem<(), (), ()> + 'static,
S: IntoSystem<(), (), M> + 'static,
{
cx.use_hook(|| new_deferred_system(system, EcsContext::get_world(cx)))
.0