More explicit about argument to deserialize_field_visitor
This commit is contained in:
parent
227bea1d0b
commit
4ef1128546
@ -480,14 +480,14 @@ fn deserialize_item_enum(
|
|||||||
|
|
||||||
let type_name = item_attrs.name().deserialize_name();
|
let type_name = item_attrs.name().deserialize_name();
|
||||||
|
|
||||||
let variant_names = variants.iter()
|
let variant_names_idents = variants.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter(|&(_, variant)| !variant.attrs.skip_deserializing())
|
.filter(|&(_, variant)| !variant.attrs.skip_deserializing())
|
||||||
.map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)))
|
.map(|(i, variant)| (variant.attrs.name().deserialize_name(), field_i(i)))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let variant_visitor = deserialize_field_visitor(
|
let variant_visitor = deserialize_field_visitor(
|
||||||
variant_names,
|
variant_names_idents,
|
||||||
item_attrs,
|
item_attrs,
|
||||||
true,
|
true,
|
||||||
);
|
);
|
||||||
@ -700,14 +700,14 @@ fn deserialize_struct_visitor(
|
|||||||
fields: &[Field],
|
fields: &[Field],
|
||||||
item_attrs: &attr::Item,
|
item_attrs: &attr::Item,
|
||||||
) -> (Tokens, Tokens, Tokens) {
|
) -> (Tokens, Tokens, Tokens) {
|
||||||
let field_names = fields.iter()
|
let field_names_idents = fields.iter()
|
||||||
.enumerate()
|
.enumerate()
|
||||||
.filter(|&(_, field)| !field.attrs.skip_deserializing())
|
.filter(|&(_, field)| !field.attrs.skip_deserializing())
|
||||||
.map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)))
|
.map(|(i, field)| (field.attrs.name().deserialize_name(), field_i(i)))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
let field_visitor = deserialize_field_visitor(
|
let field_visitor = deserialize_field_visitor(
|
||||||
field_names,
|
field_names_idents,
|
||||||
item_attrs,
|
item_attrs,
|
||||||
false,
|
false,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user