mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-26 01:37:55 +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.
|
||||
let visit_seq = match *untagged {
|
||||
Untagged::No if !cattrs.has_flatten() => {
|
||||
let all_skipped = fields.iter().all(|field| field.attrs.skip_deserializing());
|
||||
let mut_seq = if all_skipped {
|
||||
let mut_seq = if field_names_idents.is_empty() {
|
||||
quote!(_)
|
||||
} else {
|
||||
quote!(mut __seq)
|
||||
|
||||
Reference in New Issue
Block a user