mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 16:08:05 +00:00
Fix adjacently tagged empty tuple variant or struct variant
This commit is contained in:
@@ -567,6 +567,17 @@ fn test_gen() {
|
||||
}
|
||||
|
||||
assert::<AssocDeriveMulti<i32, NoSerdeImpl>>();
|
||||
|
||||
#[derive(Serialize)]
|
||||
#[serde(tag = "t", content = "c")]
|
||||
enum EmptyAdjacentlyTagged {
|
||||
#[allow(dead_code)]
|
||||
Struct {},
|
||||
#[allow(dead_code)]
|
||||
Tuple(),
|
||||
}
|
||||
|
||||
assert_ser::<EmptyAdjacentlyTagged>();
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user