diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-25 08:29:10 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-09-25 08:29:10 +0200 |
| commit | 60265e456bdce6ca990968179c05f228d7f8669d (patch) | |
| tree | 728acb96eebe10a6dd0ca85d5290a7bda6da95cb | |
| parent | cbe2ec05ac0be48f808464cc61ee108ac8315b9a (diff) | |
| download | rust-60265e456bdce6ca990968179c05f228d7f8669d.tar.gz rust-60265e456bdce6ca990968179c05f228d7f8669d.zip | |
avoid using HashMap in fs test
| -rw-r--r-- | src/tools/miri/tests/pass/shims/fs.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/miri/tests/pass/shims/fs.rs b/src/tools/miri/tests/pass/shims/fs.rs index 62424ca26b1..81151f4ac47 100644 --- a/src/tools/miri/tests/pass/shims/fs.rs +++ b/src/tools/miri/tests/pass/shims/fs.rs @@ -4,7 +4,7 @@ #![feature(io_error_more)] #![feature(io_error_uncategorized)] -use std::collections::HashMap; +use std::collections::BTreeMap; use std::ffi::OsString; use std::fs::{ File, OpenOptions, canonicalize, create_dir, read_dir, remove_dir, remove_dir_all, remove_file, @@ -262,7 +262,7 @@ fn test_directory() { create_dir(&dir_1).unwrap(); // Test that read_dir metadata calls succeed assert_eq!( - HashMap::from([ + BTreeMap::from([ (OsString::from("test_file_1"), true), (OsString::from("test_file_2"), true), (OsString::from("test_dir_1"), false) @@ -273,7 +273,7 @@ fn test_directory() { let e = e.unwrap(); (e.file_name(), e.metadata().unwrap().is_file()) }) - .collect::<HashMap<_, _>>() + .collect::<BTreeMap<_, _>>() ); // Deleting the directory should fail, since it is not empty. assert_eq!(ErrorKind::DirectoryNotEmpty, remove_dir(&dir_path).unwrap_err().kind()); |
