mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-05-09 01:17:57 +00:00
Extend test_internally_tagged_newtype_variant_containing_unit_struct to cover structs and seqs
This commit is contained in:
@@ -1287,8 +1287,9 @@ mod content {
|
||||
// }
|
||||
//
|
||||
// We want {"topic":"Info"} to deserialize even though
|
||||
// ordinarily unit structs do not deserialize from empty map.
|
||||
// ordinarily unit structs do not deserialize from empty map/seq.
|
||||
Content::Map(ref v) if v.is_empty() => visitor.visit_unit(),
|
||||
Content::Seq(ref v) if v.is_empty() => visitor.visit_unit(),
|
||||
_ => self.deserialize_any(visitor),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user