diff options
author | Melody Horn <melody@boringcactus.com> | 2021-03-21 14:10:24 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2021-03-21 14:10:24 -0600 |
commit | 7bbbfd046324363c8db1fb15d39aeb02fe7331b5 (patch) | |
tree | a416bb991c23e083d0b5816dfc8b00cd1aceda78 /examples/enum_external.rs | |
parent | b1417006df376e6c406bff43740dd11aa7ef744e (diff) | |
download | milf-rs-main.tar.gz milf-rs-main.zip |
Diffstat (limited to 'examples/enum_external.rs')
-rw-r--r-- | examples/enum_external.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/enum_external.rs b/examples/enum_external.rs index a7dd84a..4cddabb 100644 --- a/examples/enum_external.rs +++ b/examples/enum_external.rs @@ -1,5 +1,5 @@ //! An example showing off the usage of `Deserialize` to automatically decode -//! TOML into a Rust `struct`, with enums. +//! MILF into a Rust `struct`, with enums. #![deny(warnings)] @@ -26,7 +26,7 @@ enum MyEnum { } fn main() { - let toml_str = r#" + let milf_str = r#" plain = "Plain" plain_table = { Plain = {} } tuple = { Tuple = { 0 = 123, 1 = true } } @@ -39,6 +39,6 @@ fn main() { { Struct = { value = 123 } } ]"#; - let decoded: Config = toml::from_str(toml_str).unwrap(); + let decoded: Config = milf::from_str(milf_str).unwrap(); println!("{:#?}", decoded); } |