Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

Commit

Permalink
Merge pull request #136 from tshepang/patch-1
Browse files Browse the repository at this point in the history
doc: give Value::as_mapping_mut example room to breath
  • Loading branch information
dtolnay committed Sep 26, 2019
2 parents af5c890 + d05adf7 commit 74f6cd2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/value/mod.rs
Expand Up @@ -567,11 +567,11 @@ impl Value {
/// # use serde_yaml::{Value, Mapping, Number};
/// let mut v: Value = serde_yaml::from_str("a: 42").unwrap();
/// let m = v.as_mapping_mut().unwrap();
/// m.insert(Value::String("b".into()),Value::Number(Number::from(21)));
/// m.insert(Value::String("b".into()), Value::Number(Number::from(21)));
///
/// let mut expected = Mapping::new();
/// expected.insert(Value::String("a".into()),Value::Number(Number::from(42)));
/// expected.insert(Value::String("b".into()),Value::Number(Number::from(21)));
/// expected.insert(Value::String("a".into()), Value::Number(Number::from(42)));
/// expected.insert(Value::String("b".into()), Value::Number(Number::from(21)));
///
/// assert_eq!(m, &expected);
/// ```
Expand Down

0 comments on commit 74f6cd2

Please sign in to comment.