diff options
-rw-r--r-- | ecs-macros/src/lib.rs | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/ecs-macros/src/lib.rs b/ecs-macros/src/lib.rs index 2fd2c52..a3ddc2a 100644 --- a/ecs-macros/src/lib.rs +++ b/ecs-macros/src/lib.rs @@ -47,12 +47,6 @@ pub fn component_derive(input: TokenStream) -> TokenStream let item_ident = item.ident(); - let component_attr = item - .attribute::<ComponentAttribute>("component") - .unwrap_or_default(); - - let drop_last = component_attr.drop_last; - let (impl_generics, type_generics, where_clause) = item.generics().split_for_impl(); let ecs_path = find_engine_ecs_crate_path().unwrap_or_else(|| syn_path!(ecs)); @@ -65,11 +59,6 @@ pub fn component_derive(input: TokenStream) -> TokenStream type RefMut<'component> = #ecs_path::system::ComponentRefMut<'component, Self>; - fn drop_last(&self) -> bool - { - #drop_last - } - fn as_any_mut(&mut self) -> &mut dyn std::any::Any { self @@ -232,36 +221,6 @@ impl ToTokens for TypeItem } #[derive(Debug, Default)] -struct ComponentAttribute -{ - drop_last: bool, -} - -impl FromAttribute for ComponentAttribute -{ - fn from_attribute(attribute: &Attribute) -> Result<Self, syn::Error> - { - let mut drop_last = false; - - attribute.parse_nested_meta(|meta| { - if meta - .path - .get_ident() - .is_some_and(|flag| flag == "drop_last") - { - drop_last = true; - - return Ok(()); - } - - Err(meta.error("Unrecognized token")) - })?; - - Ok(Self { drop_last }) - } -} - -#[derive(Debug, Default)] struct SoleAttribute { drop_last: bool, |