From 622efaca17256fb42dafc61c8df1f3037c1fb772 Mon Sep 17 00:00:00 2001 From: David Orchard Date: Thu, 29 Jul 2021 00:02:39 -0700 Subject: Disable map order preservation for hjson --- tests/file_hjson.rs | 11 ++--------- tests/legacy/file_hjson.rs | 11 ++--------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/tests/file_hjson.rs b/tests/file_hjson.rs index c6d9bd5..376993f 100644 --- a/tests/file_hjson.rs +++ b/tests/file_hjson.rs @@ -60,15 +60,8 @@ fn test_file() { assert_eq!(s.elements.len(), 10); assert_eq!(s.elements[3], "4".to_string()); assert_eq!( - s.place - .creator - .into_iter() - .collect::>(), - vec![ - ("name".to_string(), "John Smith".into()), - ("username".into(), "jsmith".into()), - ("email".into(), "jsmith@localhost".into()), - ] + s.place.creator["name"].clone().into_string().unwrap(), + "John Smith".to_string() ); } diff --git a/tests/legacy/file_hjson.rs b/tests/legacy/file_hjson.rs index 2f5717f..b846c91 100644 --- a/tests/legacy/file_hjson.rs +++ b/tests/legacy/file_hjson.rs @@ -58,15 +58,8 @@ fn test_file() { assert_eq!(s.elements.len(), 10); assert_eq!(s.elements[3], "4".to_string()); assert_eq!( - s.place - .creator - .into_iter() - .collect::>(), - vec![ - ("name".to_string(), "John Smith".into()), - ("username".into(), "jsmith".into()), - ("email".into(), "jsmith@localhost".into()), - ] + s.place.creator["name"].clone().into_string().unwrap(), + "John Smith".to_string() ); } -- cgit v1.2.3