mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-12 22:31:02 +00:00
Simplify check for missing fields
This commit is contained in:
@@ -981,8 +981,7 @@ fn deserialize_struct(
|
|||||||
// structs that only have a map representation.
|
// structs that only have a map representation.
|
||||||
let visit_seq = match *untagged {
|
let visit_seq = match *untagged {
|
||||||
Untagged::No if !cattrs.has_flatten() => {
|
Untagged::No if !cattrs.has_flatten() => {
|
||||||
let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
|
let mut_seq = if field_names_idents.is_empty() {
|
||||||
let mut_seq = if all_skipped {
|
|
||||||
quote!(_)
|
quote!(_)
|
||||||
} else {
|
} else {
|
||||||
quote!(mut __seq)
|
quote!(mut __seq)
|
||||||
|
|||||||
Reference in New Issue
Block a user