Skip to content

Commit 56c8d90

Browse files
committed
Use walkdir's built-in sorting option.
1 parent 9a41a61 commit 56c8d90

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

crates/cargo-test-support/src/paths.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -160,12 +160,11 @@ impl CargoPathExt for Path {
160160
}
161161

162162
fn ls_r(&self) -> Vec<PathBuf> {
163-
let mut file_list: Vec<_> = walkdir::WalkDir::new(self)
163+
walkdir::WalkDir::new(self)
164+
.sort_by_file_name()
164165
.into_iter()
165166
.filter_map(|e| e.map(|e| e.path().to_owned()).ok())
166-
.collect();
167-
file_list.sort();
168-
file_list
167+
.collect()
169168
}
170169

171170
fn move_in_time<F>(&self, travel_amount: F)

0 commit comments

Comments
 (0)