We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This appears to be failing because the struct in question makes use of skip_serializing_if = Option::is_none.
skip_serializing_if = Option::is_none
Here is an example which passes prior to serde_test 1.0.20
serde_test
1.0.20
#[derive(Serialize, Deserialize, PartialEq, Debug)] struct A { pub x: u8, #[serde(default, skip_serializing_if = "Option::is_none")] pub y: Option<u8>, } #[test] pub fn test_struct_a() { let a = A { x: 1, y: None }; assert_tokens( &a, &[ Token::Struct { name: "A", len: 1 }, Token::Str("x"), Token::U8(1), Token::StructEnd, ], ); }
The result from a test run is:
... panicked at 'expected Token::Struct { name: "A", len: 1 } but deserialization wants Token::Struct { name: "A", len: 2 }' ...
The text was updated successfully, but these errors were encountered:
Thanks, I reverted the change in eb6bf16a5191df1e736619a8dd2a05749c86b8df and released serde_test 1.0.23.
Sorry, something went wrong.
assert_de_tokens
No branches or pull requests
This appears to be failing because the struct in question makes use of
skip_serializing_if = Option::is_none
.Here is an example which passes prior to
serde_test
1.0.20
The result from a test run is:
The text was updated successfully, but these errors were encountered: