Format with rustfmt 0.6.1

This commit is contained in:
David Tolnay 2018-05-10 09:11:19 -07:00
parent d1460e1f0d
commit f3f26796c7
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 7 additions and 2 deletions

View File

@ -864,7 +864,9 @@ fn deserialize_struct(
None => format!("struct {}", params.type_name()),
};
let visit_seq = Stmts(deserialize_seq(&type_path, params, fields, true, cattrs, &expecting));
let visit_seq = Stmts(deserialize_seq(
&type_path, params, fields, true, cattrs, &expecting,
));
let (field_visitor, fields_stmt, visit_map) = if cattrs.has_flatten() {
deserialize_struct_as_map_visitor(&type_path, params, fields, cattrs)

View File

@ -256,7 +256,10 @@ fn serialize_tuple_struct(
.map(|(i, field)| match field.attrs.skip_serializing_if() {
None => quote!(1),
Some(path) => {
let index = syn::Index { index: i as u32, span: Span::call_site() };
let index = syn::Index {
index: i as u32,
span: Span::call_site(),
};
let field_expr = get_member(params, field, &Member::Unnamed(index));
quote!(if #path(#field_expr) { 0 } else { 1 })
}