Skip to content

Commit

Permalink
Merge pull request #545 from SomeoneToIgnore/more-valuedeserializer-c…
Browse files Browse the repository at this point in the history
…reation-docs

Update ValueDeserializer creation docs
  • Loading branch information
epage committed Apr 14, 2023
2 parents 5afe783 + ca934c8 commit bd4bde0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/toml_edit/src/de/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ use crate::de::Error;

/// Deserialization implementation for TOML [values][crate::Value].
///
/// Can be creater either directly from TOML strings, using [`std::str::FromStr`],
/// or from parsed [values][crate::Value] using [`serde::de::IntoDeserializer::into_deserializer`].
///
/// # Example
///
/// ```
Expand All @@ -24,7 +27,6 @@ use crate::de::Error;
/// let value = r#"{ title = 'TOML Example', owner = { name = 'Lisa' } }"#;
/// let deserializer = value.parse::<toml_edit::de::ValueDeserializer>().unwrap();
/// let config = Config::deserialize(deserializer).unwrap();
///
/// assert_eq!(config.title, "TOML Example");
/// assert_eq!(config.owner.name, "Lisa");
/// ```
Expand Down

0 comments on commit bd4bde0

Please sign in to comment.