fn gen_unit_struct_bundle_impl(ident: syn::Ident, generics: &syn::Generics) -> TokenStream2 {
    let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
    quote! {
        unsafe impl #impl_generics ::hecs::Bundle for #ident #ty_generics #where_clause {
            #[allow(non_camel_case_types)]
            fn with_static_ids<__hecs__T>(f: impl ::std::ops::FnOnce(&[::std::any::TypeId]) -> __hecs__T) -> __hecs__T { f(&[]) }
            #[allow(non_camel_case_types)]
            fn with_static_type_info<__hecs__T>(f: impl ::std::ops::FnOnce(&[::hecs::TypeInfo]) -> __hecs__T) -> __hecs__T { f(&[]) }

            unsafe fn get(
                mut f: impl ::std::ops::FnMut(::hecs::TypeInfo) -> ::std::option::Option<::std::ptr::NonNull<u8>>,
            ) -> ::std::result::Result<Self, ::hecs::MissingComponent> {
                ::std::result::Result::Ok(Self {/* for some reason this works for all unit struct variations */})
            }
        }
    }
}
// no reason to generate a static for unit structs
no reason to generate a static for unit structs
no reason to generate a static for unit structs
fn gen_unit_struct_bundle_impl(ident: syn::Ident, generics: &syn::Generics) -> TokenStream2 {
    let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
    quote! {
        unsafe impl #impl_generics ::hecs::Bundle for #ident #ty_generics #where_clause {
            #[allow(non_camel_case_types)]
            fn with_static_ids<__hecs__T>(f: impl ::std::ops::FnOnce(&[::std::any::TypeId]) -> __hecs__T) -> __hecs__T { f(&[]) }
            #[allow(non_camel_case_types)]
            fn with_static_type_info<__hecs__T>(f: impl ::std::ops::FnOnce(&[::hecs::TypeInfo]) -> __hecs__T) -> __hecs__T { f(&[]) }
            unsafe fn get(
                mut f: impl ::std::ops::FnMut(::hecs::TypeInfo) -> ::std::option::Option<::std::ptr::NonNull<u8>>,
            ) -> ::std::result::Result<Self, ::hecs::MissingComponent> {
                ::std::result::Result::Ok(Self {/* for some reason this works for all unit struct variations */})
            }
        }
    }
}
fn gen_unit_struct_bundle_impl ( ident : syn :: Ident , generics : & syn :: Generics ) -> TokenStream2 { let ( impl_generics , ty_generics , where_clause ) = generics . split_for_impl ( ) ; quote ! { unsafe impl impl_generics hecs Bundle for ident ty_generics where_clause { [ allow ( non_camel_case_types ) ] fn with_static_ids hecs__T ( f impl std ops FnOnce ( [ std any TypeId ] ) __hecs__T ) __hecs__T { f ( [ ] ) } [ allow ( non_camel_case_types ) ] fn with_static_type_info hecs__T ( f impl std ops FnOnce ( [ hecs TypeInfo ] ) __hecs__T ) __hecs__T { f ( [ ] ) } unsafe fn get ( mut f impl std ops FnMut ( hecs TypeInfo ) std option Option std ptr NonNull u8 ) std result Result Self hecs MissingComponent { std result Result Ok ( Self { /* for some reason this works for all unit struct variations */ } ) } } } }
no reason to generate a static for unit structs
no reason to generate a static for unit structs
ident
syn::Ident
generics
&syn::Generics
ident
syn::Ident
generics
&syn::Generics