mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-04-22 20:38:02 +00:00
Merge pull request #111 from oli-obk/master
tuple enums with single element should not be a json-array
This commit is contained in:
@@ -556,6 +556,12 @@ fn deserialize_variant(
|
||||
Ok($type_ident::$variant_ident)
|
||||
})
|
||||
}
|
||||
ast::TupleVariantKind(ref args) if args.len() == 1 => {
|
||||
quote_expr!(cx, {
|
||||
let val = try!(visitor.visit_simple());
|
||||
Ok($type_ident::$variant_ident(val))
|
||||
})
|
||||
}
|
||||
ast::TupleVariantKind(ref args) => {
|
||||
deserialize_tuple_variant(
|
||||
cx,
|
||||
|
||||
Reference in New Issue
Block a user