Skip to content

Commit

Permalink
fix no-default-features
Browse files Browse the repository at this point in the history
  • Loading branch information
Nertsal committed Nov 6, 2024
1 parent 4a5b81b commit aebf18a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion crates/stecs-derive/src/split.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,12 @@ This struct is a version of `{struct_name}` that holds each field in its own [St

// struct StructOf
let struct_of = {
#[cfg(not(feature = "dynamic"))]
let dynamic = quote! {};
#[cfg(feature = "dynamic")]
let dynamic =
quote! { pub r#dyn: ::stecs::dynamic::DynamicStorage<#generic_family_name::Id>, };

let struct_of_doc = format!(
r#"Generated by `#[derive(SplitFields)]`.
This struct is a version of `{struct_name}` that holds each field in its own [Storage](::stecs::storage::Storage).
Expand All @@ -376,7 +382,7 @@ This struct is a version of `{struct_name}` that holds each field in its own [St
#vis struct #struct_of_name<#generics_family> {
pub ids: #generic_family_name::Generator,
pub inner: #struct_split_name<#generics_family_use>,
pub r#dyn: ::stecs::dynamic::DynamicStorage<#generic_family_name::Id>,
#dynamic
}
}
};
Expand Down

0 comments on commit aebf18a

Please sign in to comment.