From 8858d1831ce0291ddad01f39b54cdd29583c7e30 Mon Sep 17 00:00:00 2001 From: Jonas Bushart Date: Fri, 12 Mar 2021 18:12:22 +0100 Subject: [PATCH] Doctest: Specify newline separator for RON to fix Windows --- src/lib.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index c121d17f..6ddea3e8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1382,7 +1382,9 @@ pub struct TimestampNanoSecondsWithFrac< /// # vec: "QWEh", /// # )"#; /// -/// assert_eq!(expected, ron::ser::to_string_pretty(&value, Default::default()).unwrap()); +/// # let pretty_config = ron::ser::PrettyConfig::new() +/// # .with_new_line("\n".into()); +/// assert_eq!(expected, ron::ser::to_string_pretty(&value, pretty_config).unwrap()); /// assert_eq!(value, ron::from_str(&expected).unwrap()); /// # } /// ```