mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-24 04:07:59 +00:00
Catch wrong field names length in serde_test
This commit is contained in:
@@ -425,6 +425,10 @@ pub enum Token {
|
||||
|
||||
/// The header of a struct.
|
||||
///
|
||||
/// When testing deserialization, the `len` field must match the number of
|
||||
/// fields that the struct expects to deserialize. This may be different
|
||||
/// from the number of fields contained in the input tokens.
|
||||
///
|
||||
/// After this header are the fields of the struct, followed by `StructEnd`.
|
||||
///
|
||||
/// ```rust
|
||||
@@ -461,6 +465,10 @@ pub enum Token {
|
||||
|
||||
/// The header of a struct variant of an enum.
|
||||
///
|
||||
/// When testing deserialization, the `len` field must match the number of
|
||||
/// fields that the struct variant expects to deserialize. This may be
|
||||
/// different from the number of fields contained in the input tokens.
|
||||
///
|
||||
/// After this header are the fields of the struct variant, followed by
|
||||
/// `StructVariantEnd`.
|
||||
///
|
||||
|
||||
Reference in New Issue
Block a user