mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-11-05 08:51:07 +00:00
Simplify check for missing fields
This commit is contained in:
1 parent
5ffebeb6ef
commit
fb3a9e0d7c
1 file changed
+1
-2
@@ -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