From 0bd380ee23c8a1f3bbfc8c306f3736e279fb74ec Mon Sep 17 00:00:00 2001 From: Erick Tryzelaar Date: Mon, 8 Feb 2016 08:30:29 -0800 Subject: [PATCH] chore(cleanup): Minor reorganization of attr.rs --- serde_codegen/src/attr.rs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/serde_codegen/src/attr.rs b/serde_codegen/src/attr.rs index a021ef9c..a7d4af55 100644 --- a/serde_codegen/src/attr.rs +++ b/serde_codegen/src/attr.rs @@ -21,6 +21,18 @@ pub enum FieldNames { } } +/// Represents container (e.g. struct) attribute information +#[derive(Debug)] +pub struct ContainerAttrs { + deny_unknown_fields: bool, +} + +impl ContainerAttrs { + pub fn deny_unknown_fields(&self) -> bool { + self.deny_unknown_fields + } +} + /// Represents field attribute information #[derive(Debug)] pub struct FieldAttrs { @@ -263,18 +275,6 @@ impl<'a> FieldAttrsBuilder<'a> { } } -/// Represents container (e.g. struct) attribute information -#[derive(Debug)] -pub struct ContainerAttrs { - deny_unknown_fields: bool, -} - -impl ContainerAttrs { - pub fn deny_unknown_fields(&self) -> bool { - self.deny_unknown_fields - } -} - pub struct ContainerAttrsBuilder<'a> { cx: &'a ExtCtxt<'a>, deny_unknown_fields: bool,