diff --git a/serde_derive/src/internals/attr.rs b/serde_derive/src/internals/attr.rs index bf4b6b86..abfb005b 100644 --- a/serde_derive/src/internals/attr.rs +++ b/serde_derive/src/internals/attr.rs @@ -231,7 +231,7 @@ impl Container { } // Parse `#[serde(transparent)]` - Meta(Word(word)) if word == "transparent" => { + Meta(Word(ref word)) if word == "transparent" => { transparent.set_true(); } diff --git a/serde_derive/src/ser.rs b/serde_derive/src/ser.rs index fe946d34..c78237bf 100644 --- a/serde_derive/src/ser.rs +++ b/serde_derive/src/ser.rs @@ -193,7 +193,7 @@ fn serialize_transparent(cont: &Container, params: &Parameters) -> Fragment { Data::Enum(_) => unreachable!(), }; - let self_var = params.self_var; + let self_var = ¶ms.self_var; let transparent_field = fields.iter().find(|f| f.attrs.transparent()).unwrap(); let member = &transparent_field.member;