Format with rustfmt 0.6.1
This commit is contained in:
parent
d1460e1f0d
commit
f3f26796c7
@ -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)
|
||||
|
@ -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 })
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user