From cce1602e07c4475e05868d5236db57cf92f59593 Mon Sep 17 00:00:00 2001 From: Connor Meehan Date: Tue, 3 Dec 2024 18:37:34 +1100 Subject: [PATCH 1/2] fix: remove accidental tokio import in ecs.rs --- src/ecs.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/ecs.rs b/src/ecs.rs index 89db907..112ffb1 100644 --- a/src/ecs.rs +++ b/src/ecs.rs @@ -17,9 +17,8 @@ use std::{ cell::{Cell, RefCell}, mem, ptr, rc::Rc, - sync::{Arc, Mutex}, + sync::{Arc, Mutex, RwLockWriteGuard}, }; -use tokio::sync::RwLockWriteGuard; macro_rules! impl_trait_for_tuples { ($t:tt) => { From 8313b3757ec3ec8b5449a4f7ad4beaaebeca6fa9 Mon Sep 17 00:00:00 2001 From: Matt Hunzinger Date: Tue, 3 Dec 2024 02:45:08 -0500 Subject: [PATCH 2/2] Remove unused lock guard --- src/ecs.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/ecs.rs b/src/ecs.rs index 112ffb1..e369c42 100644 --- a/src/ecs.rs +++ b/src/ecs.rs @@ -17,7 +17,7 @@ use std::{ cell::{Cell, RefCell}, mem, ptr, rc::Rc, - sync::{Arc, Mutex, RwLockWriteGuard}, + sync::{Arc, Mutex}, }; macro_rules! impl_trait_for_tuples { @@ -41,7 +41,6 @@ impl Plugin for ActuatePlugin { fn build(&self, app: &mut App) { let rt = Runtime { composers: RefCell::new(HashMap::new()), - lock: None, }; app.insert_non_send_resource(rt) @@ -91,7 +90,6 @@ struct RuntimeComposer { struct Runtime { composers: RefCell>, - lock: Option>, } /// Composition of some composable content. @@ -179,9 +177,6 @@ impl Compose for CompositionContent { } fn compose(world: &mut World) { - let mut rt = world.non_send_resource_mut::(); - rt.lock = None; - RUNTIME_CONTEXT.with(|runtime_cx| { let mut cell = runtime_cx.borrow_mut(); let runtime_cx = cell.get_or_insert_with(|| RuntimeContext {