This commit is contained in:
2025-06-24 17:21:12 +02:00
parent f72959bcee
commit 6c0dde8e85
5 changed files with 65 additions and 88 deletions
+12
View File
@@ -0,0 +1,12 @@
#[macro_export]
macro_rules! components {
($($a:ty: $e:expr),*) => {
{
let mut hm: HashMap<TypeId, Box<dyn Component>> = HashMap::new();
$(
hm.insert(TypeId::of::<$a>(), Box::new($e));
)*
hm
}
};
}