diff options
Diffstat (limited to 'engine-ecs-macros/src')
| -rw-r--r-- | engine-ecs-macros/src/lib.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/engine-ecs-macros/src/lib.rs b/engine-ecs-macros/src/lib.rs index 3a025fb..28b0ee5 100644 --- a/engine-ecs-macros/src/lib.rs +++ b/engine-ecs-macros/src/lib.rs @@ -124,6 +124,11 @@ pub fn component_derive(input: TokenStream) -> TokenStream { stringify!(#item_ident).into() } + + fn module_path() -> &'static str + { + module_path!().rsplit_once("::").unwrap().0 + } } impl SystemInput for #item_ident @@ -250,6 +255,11 @@ pub fn sole_derive(input: TokenStream) -> TokenStream { stringify!(#item_ident).into() } + + fn module_path() -> &'static str + { + module_path!().rsplit_once("::").unwrap().0 + } } impl From<#item_ident> for #ecs_path::component::Parts |
