serialize tuple enums with single element directly as the value instead of a sequence

This commit is contained in:
Oliver Schneider
2015-07-17 15:19:11 +02:00
parent 5885111863
commit 24787195a1
8 changed files with 94 additions and 4 deletions
+2 -2
View File
@@ -473,13 +473,13 @@ fn test_lifetimes() {
let lifetime = Lifetimes::LifetimeSeq(&value);
assert_eq!(
serde_json::to_string(&lifetime).unwrap(),
"{\"LifetimeSeq\":[5]}"
"{\"LifetimeSeq\":5}"
);
let lifetime = Lifetimes::NoLifetimeSeq(5);
assert_eq!(
serde_json::to_string(&lifetime).unwrap(),
"{\"NoLifetimeSeq\":[5]}"
"{\"NoLifetimeSeq\":5}"
);
let value = 5;