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

Update readme code samples to not fail assert #164

Merged
merged 1 commit into from
Jun 10, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ fn main() -> Result<(), serde_yaml::Error> {

// Serialize it to a YAML string.
let s = serde_yaml::to_string(&map)?;
assert_eq!(s, "---\nx: 1\ny: 2");
assert_eq!(s, "---\nx: 1.0\ny: 2.0");

// Deserialize it back to a Rust type.
let deserialized_map: BTreeMap<String, f64> = serde_yaml::from_str(&s)?;
Expand Down Expand Up @@ -79,7 +79,7 @@ fn main() -> Result<(), serde_yaml::Error> {
let point = Point { x: 1.0, y: 2.0 };

let s = serde_yaml::to_string(&point)?;
assert_eq!(s, "---\nx: 1\ny: 2");
assert_eq!(s, "---\nx: 1.0\ny: 2.0");

let deserialized_point: Point = serde_yaml::from_str(&s)?;
assert_eq!(point, deserialized_point);
Expand Down