fn gen_unit_struct_bundle_impl(
    crate_path: &syn::Path,
    ident: syn::Ident,
    generics: &syn::Generics,
) -> TokenStream2 {
    let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
    quote! {
        impl #impl_generics ::#crate_path::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(&[]) }
            fn static_type_info() -> ::std::vec::Vec<::#crate_path::TypeInfo> { ::std::vec::Vec::new() }

            unsafe fn get(
                f: impl ::std::ops::FnMut(::std::any::TypeId, usize) -> ::std::option::Option<::std::ptr::NonNull<u8>>,
            ) -> Result<Self, ::#crate_path::MissingComponent> {
                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(
    crate_path: &syn::Path,
    ident: syn::Ident,
    generics: &syn::Generics,
) -> TokenStream2 {
    let (impl_generics, ty_generics, where_clause) = generics.split_for_impl();
    quote! {
        impl #impl_generics ::#crate_path::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(&[]) }
            fn static_type_info() -> ::std::vec::Vec<::#crate_path::TypeInfo> { ::std::vec::Vec::new() }
            unsafe fn get(
                f: impl ::std::ops::FnMut(::std::any::TypeId, usize) -> ::std::option::Option<::std::ptr::NonNull<u8>>,
            ) -> Result<Self, ::#crate_path::MissingComponent> {
                Ok(Self {/* for some reason this works for all unit struct variations */})
            }
        }
    }
}
fn gen_unit_struct_bundle_impl ( crate_path : & syn :: Path , ident : syn :: Ident , generics : & syn :: Generics , ) -> TokenStream2 { let ( impl_generics , ty_generics , where_clause ) = generics . split_for_impl ( ) ; quote ! { impl impl_generics crate_path 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 ( [ ] ) } fn static_type_info ( ) std vec Vec crate_path TypeInfo { std vec Vec new ( ) } unsafe fn get ( f impl std ops FnMut ( std any TypeId usize ) std option Option std ptr NonNull u8 ) Result Self crate_path MissingComponent { 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
crate_path
&syn::Path
ident
syn::Ident
generics
&syn::Generics
crate_path
&syn::Path
ident
syn::Ident
generics
&syn::Generics