Fix incorrect count of fields passed to tuple deserialization methods

This count should mean the number of fields expected in the serialized form,
so if some fields are skipped, they shouldn't be counted

Methods affected:
- Deserializer::deserialize_tuple
- Deserializer::deserialize_tuple_struct
- VariantAccess::tuple_variant
This commit is contained in:
Mingun
2023-05-27 17:17:00 +05:00
parent 1aebdc2760
commit 2c1f62d4b4
2 changed files with 23 additions and 15 deletions
+1 -1
View File
@@ -1533,7 +1533,7 @@ fn test_invalid_length_enum() {
Token::TupleVariant {
name: "InvalidLengthEnum",
variant: "B",
len: 3,
len: 2,
},
Token::I32(1),
Token::TupleVariantEnd,