updated all deps

migrated away from paste and async-std
This commit is contained in:
2025-09-03 18:42:54 +02:00
parent 7031f3a7d8
commit 088cb6a247
44 changed files with 569 additions and 456 deletions

View File

@@ -62,7 +62,7 @@ pub trait SystemCtor: Send + Sync + 'static {
type Instance: System;
const NAME: &'static str;
const VERSION: f64;
fn inst() -> Option<Self::Instance>;
fn inst(deps: <Self::Deps as DepDef>::Sat) -> Self::Instance;
}
pub trait DynSystemCtor: Send + Sync + 'static {
@@ -81,8 +81,8 @@ impl<T: SystemCtor> DynSystemCtor for T {
}
fn new_system(&self, api::NewSystem { system: _, id: _, depends }: &api::NewSystem) -> CtedObj {
let mut ids = depends.iter().copied();
let inst = Arc::new(T::inst().expect("Constructor did not create system"));
let deps = T::Deps::create(&mut || ids.next().unwrap());
let inst = Arc::new(T::inst(deps.clone()));
Arc::new(Cted::<T> { deps, inst })
}
}