about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src/persist/fs/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_incremental/src/persist/fs/tests.rs')
-rw-r--r--compiler/rustc_incremental/src/persist/fs/tests.rs13
1 files changed, 3 insertions, 10 deletions
diff --git a/compiler/rustc_incremental/src/persist/fs/tests.rs b/compiler/rustc_incremental/src/persist/fs/tests.rs
index 4c1cb5725dc..644b8187621 100644
--- a/compiler/rustc_incremental/src/persist/fs/tests.rs
+++ b/compiler/rustc_incremental/src/persist/fs/tests.rs
@@ -2,23 +2,16 @@ use super::*;
 
 #[test]
 fn test_all_except_most_recent() {
-    let computed: UnordMap<_, Option<flock::Lock>> = UnordMap::from_iter([
+    let input: UnordMap<_, Option<flock::Lock>> = UnordMap::from_iter([
         ((UNIX_EPOCH + Duration::new(4, 0), PathBuf::from("4")), None),
         ((UNIX_EPOCH + Duration::new(1, 0), PathBuf::from("1")), None),
         ((UNIX_EPOCH + Duration::new(5, 0), PathBuf::from("5")), None),
         ((UNIX_EPOCH + Duration::new(3, 0), PathBuf::from("3")), None),
         ((UNIX_EPOCH + Duration::new(2, 0), PathBuf::from("2")), None),
     ]);
-    let mut paths = UnordSet::default();
-    paths.extend_unord(all_except_most_recent(computed).into_items().map(|(path, _)| path));
     assert_eq!(
-        UnordSet::from(paths),
-        UnordSet::from_iter([
-            PathBuf::from("1"),
-            PathBuf::from("2"),
-            PathBuf::from("3"),
-            PathBuf::from("4")
-        ])
+        all_except_most_recent(input).into_items().map(|(path, _)| path).into_sorted_stable_ord(),
+        vec![PathBuf::from("1"), PathBuf::from("2"), PathBuf::from("3"), PathBuf::from("4")]
     );
 
     assert!(all_except_most_recent(UnordMap::default()).is_empty());