diff --git a/snowchains_core/CHANGELOG.md b/snowchains_core/CHANGELOG.md index 8b6574f8..51590ad3 100644 --- a/snowchains_core/CHANGELOG.md +++ b/snowchains_core/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed - Added a workaround for large process input/output. +- Followed [dtolnay/serde-yaml@ef9907](https://github.com/dtolnay/serde-yaml/commit/ef990758a19d4d845cf19a8943e7d905909cafd8). ## [0.8.1] - 2021-01-21Z diff --git a/snowchains_core/src/testsuite.rs b/snowchains_core/src/testsuite.rs index af6b2f13..9d1921b1 100644 --- a/snowchains_core/src/testsuite.rs +++ b/snowchains_core/src/testsuite.rs @@ -101,8 +101,7 @@ impl TestSuite { fn key_value(key: impl Serialize, value: impl Serialize) -> serde_yaml::Result { let key = serde_yaml::to_value(key)?; let mut acc = serde_yaml::to_string(&hashmap!(key => value))?; - debug_assert!(acc.starts_with("---\n")); - acc += "\n"; + debug_assert!(acc.starts_with("---\n") && acc.ends_with('\n')); Ok(acc.split_off(4)) } @@ -123,6 +122,7 @@ impl TestSuite { let mut acc = serde_yaml::to_string(&hashmap!(&key => serde_yaml::Value::Null)) .ok()? .trim_start_matches("---\n") + .trim_end_matches('\n') .trim_end_matches('~') .to_owned();