diff --git a/core/src/codegen/trait_impl.rs b/core/src/codegen/trait_impl.rs index a2fa989..2f4f4ae 100644 --- a/core/src/codegen/trait_impl.rs +++ b/core/src/codegen/trait_impl.rs @@ -27,16 +27,13 @@ impl<'a> TraitImpl<'a> { .collect() } - /// Get the type parameters which are used by non-skipped fields. + /// Get the type parameters which are used by non-skipped, non-magic fields. + /// These type parameters will have a `FromMeta` bound applied to them in emitted + /// code. pub fn used_type_params(&self) -> IdentSet { self.type_params_matching(|f| !f.skip, |v| !v.skip) } - /// Get the type parameters which are used by skipped fields. - pub fn skipped_type_params(&self) -> IdentSet { - self.type_params_matching(|f| f.skip, |v| v.skip) - } - fn type_params_matching<'b, F, V>(&'b self, field_filter: F, variant_filter: V) -> IdentSet where F: Fn(&&Field) -> bool, diff --git a/core/src/lib.rs b/core/src/lib.rs index 4cb73a4..6ce361b 100644 --- a/core/src/lib.rs +++ b/core/src/lib.rs @@ -19,7 +19,7 @@ mod macros_private; mod macros_public; pub mod ast; -pub mod codegen; +pub(crate) mod codegen; pub mod derive; pub mod error; mod from_derive_input; @@ -29,7 +29,7 @@ mod from_generics; mod from_meta; mod from_type_param; mod from_variant; -pub mod options; +pub(crate) mod options; pub mod usage; pub mod util; diff --git a/core/src/options/shape.rs b/core/src/options/shape.rs index 7c27adb..8759669 100644 --- a/core/src/options/shape.rs +++ b/core/src/options/shape.rs @@ -26,15 +26,6 @@ pub struct Shape { any: bool, } -impl Shape { - pub fn all() -> Self { - Shape { - any: true, - ..Default::default() - } - } -} - impl Default for Shape { fn default() -> Self { Shape {