From c23be3f85597d6042d6ebedfb363301d64fded7b Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sun, 25 Mar 2018 12:39:20 +0200 Subject: [PATCH] Revert flatten change in deserialize in place --- serde_derive/src/de.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/serde_derive/src/de.rs b/serde_derive/src/de.rs index 7bfb8e56..43171e9b 100644 --- a/serde_derive/src/de.rs +++ b/serde_derive/src/de.rs @@ -923,7 +923,7 @@ fn deserialize_struct_in_place( params, fields, cattrs); let field_visitor = Stmts(field_visitor); - let fields_stmt = fields_stmt.map(Stmts); + let fields_stmt = Stmts(fields_stmt); let visit_map = Stmts(visit_map); let visitor_expr = quote! { @@ -2353,7 +2353,7 @@ fn deserialize_struct_as_struct_in_place_visitor( params: &Parameters, fields: &[Field], cattrs: &attr::Container, -) -> (Fragment, Option, Fragment) { +) -> (Fragment, Fragment, Fragment) { assert!(!cattrs.has_flatten()); let field_names_idents: Vec<_> = fields @@ -2374,7 +2374,7 @@ fn deserialize_struct_as_struct_in_place_visitor( let visit_map = deserialize_map_in_place(params, fields, cattrs); - (field_visitor, Some(fields_stmt), visit_map) + (field_visitor, fields_stmt, visit_map) } #[cfg(feature = "deserialize_in_place")]