diff options
| author | HampusM <hampus@hampusmat.com> | 2026-04-27 15:22:17 +0200 |
|---|---|---|
| committer | HampusM <hampus@hampusmat.com> | 2026-04-27 15:22:17 +0200 |
| commit | 3bd1e0fe3af32a80c068a7fdb5ced0929ca3d7f1 (patch) | |
| tree | 2133359062b615f0df7828f792471dfbddb32559 /ecs | |
| parent | ddbf984fb7187f42322e214504e0dde76e4efd8d (diff) | |
feat(ecs): add support for systems with no params
Diffstat (limited to 'ecs')
| -rw-r--r-- | ecs/src/system.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/ecs/src/system.rs b/ecs/src/system.rs index 95ab7a8..ff3437a 100644 --- a/ecs/src/system.rs +++ b/ecs/src/system.rs @@ -3,8 +3,8 @@ use std::fmt::Debug; use ecs_macros::Component; use seq_macro::seq; -use crate::uid::Uid; use crate::World; +use crate::uid::Uid; pub mod initializable; pub mod observer; @@ -38,6 +38,8 @@ macro_rules! impl_system { fn finish(self) -> (TypeErased, Self::Callbacks) { + #![allow(unused)] + let type_erased = TypeErased { run: Box::new(move |world, metadata| { // SAFETY: The caller of TypeErased::run ensures the lifetime @@ -57,7 +59,7 @@ macro_rules! impl_system { }; } -seq!(C in 1..16 { +seq!(C in 0..16 { impl_system!(C); }); |
