summaryrefslogtreecommitdiff
path: root/ecs-macros/src
diff options
context:
space:
mode:
Diffstat (limited to 'ecs-macros/src')
-rw-r--r--ecs-macros/src/lib.rs24
1 files changed, 5 insertions, 19 deletions
diff --git a/ecs-macros/src/lib.rs b/ecs-macros/src/lib.rs
index 862b0b1..a5acc2b 100644
--- a/ecs-macros/src/lib.rs
+++ b/ecs-macros/src/lib.rs
@@ -120,7 +120,6 @@ pub fn component_derive(input: TokenStream) -> TokenStream
};
use #ecs_path::uid::{Uid, Kind as UidKind};
use #ecs_path::system::Input as SystemInput;
- use #ecs_path::type_name::TypeName;
use super::*;
@@ -139,6 +138,11 @@ pub fn component_derive(input: TokenStream) -> TokenStream
#get_id
}
+ fn name(&self) -> &'static str
+ {
+ std::any::type_name::<Self>()
+ }
+
fn get_event_uid(&self, event_kind: ComponentEventKind) -> Uid
{
match event_kind {
@@ -156,15 +160,6 @@ pub fn component_derive(input: TokenStream) -> TokenStream
#where_clause
{
}
-
- impl #impl_generics TypeName for #item_ident #type_generics
- #where_clause
- {
- fn type_name(&self) -> &'static str
- {
- std::any::type_name::<Self>()
- }
- }
}
}
.into()
@@ -204,15 +199,6 @@ pub fn sole_derive(input: TokenStream) -> TokenStream
self
}
}
-
- impl #impl_generics #ecs_path::type_name::TypeName for #item_ident #type_generics
- #where_clause
- {
- fn type_name(&self) -> &'static str
- {
- std::any::type_name::<Self>()
- }
- }
}
.into()
}