aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/enum_external.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/enum_external.rs b/examples/enum_external.rs
index 095dca5..e2ac4f8 100644
--- a/examples/enum_external.rs
+++ b/examples/enum_external.rs
@@ -11,7 +11,8 @@ extern crate serde_derive;
#[derive(Debug, Deserialize)]
struct Config {
plain: MyEnum,
- // tuple: MyEnum,
+ plain_table: MyEnum,
+ tuple: MyEnum,
#[serde(rename = "struct")]
structv: MyEnum,
newtype: MyEnum,
@@ -29,12 +30,13 @@ enum MyEnum {
fn main() {
let toml_str = r#"
plain = "Plain"
- # tuple = { 0 = 123, 1 = true }
+ plain_table = { Plain = {} }
+ tuple = { Tuple = { 0 = 123, 1 = true } }
struct = { Struct = { value = 123 } }
newtype = { NewType = "value" }
my_enum = [
{ Plain = {} },
- # { Tuple = { 0 = 123, 1 = true } },
+ { Tuple = { 0 = 123, 1 = true } },
{ NewType = "value" },
{ Struct = { value = 123 } }
]"#;