aboutsummaryrefslogtreecommitdiff
path: root/examples/decode.rs
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2021-03-21 14:10:24 -0600
committerMelody Horn <melody@boringcactus.com>2021-03-21 14:10:24 -0600
commit7bbbfd046324363c8db1fb15d39aeb02fe7331b5 (patch)
treea416bb991c23e083d0b5816dfc8b00cd1aceda78 /examples/decode.rs
parentb1417006df376e6c406bff43740dd11aa7ef744e (diff)
downloadmilf-rs-main.tar.gz
milf-rs-main.zip
hilarious and original jokeHEADmain
Diffstat (limited to 'examples/decode.rs')
-rw-r--r--examples/decode.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/examples/decode.rs b/examples/decode.rs
index b5d6a99..63fb315 100644
--- a/examples/decode.rs
+++ b/examples/decode.rs
@@ -1,12 +1,12 @@
//! An example showing off the usage of `Deserialize` to automatically decode
-//! TOML into a Rust `struct`
+//! MILF into a Rust `struct`
#![deny(warnings)]
use serde_derive::Deserialize;
/// This is what we're going to decode into. Each field is optional, meaning
-/// that it doesn't have to be present in TOML.
+/// that it doesn't have to be present in MILF.
#[derive(Debug, Deserialize)]
struct Config {
global_string: Option<String>,
@@ -32,7 +32,7 @@ struct PeerConfig {
}
fn main() {
- let toml_str = r#"
+ let milf_str = r#"
global_string = "test"
global_integer = 5
@@ -48,6 +48,6 @@ fn main() {
ip = "127.0.0.1"
"#;
- let decoded: Config = toml::from_str(toml_str).unwrap();
+ let decoded: Config = milf::from_str(milf_str).unwrap();
println!("{:#?}", decoded);
}