Skip to content

Commit 180ad91

Browse files
committed
Auto merge of #11333 - ehuss:remove-remove_dir_all, r=epage
Remove remove_dir_all This removes the `remove_dir_all` dependency. It is no longer needed, as there has been significant improvements to std's implementation over the years (particularly recently). This improves the performance of running cargo's testsuite on my machine from 8m to 2m 30s (!!). This was added in #7137 to deal with some issues with symbolic links. I believe those seem to be resolved now. Note that std's implementation is still not bullet proof. In particular, I think there are still some cases where a file can be locked by another process which prevents it from being removed. There are some more notes about this at #7042 (comment) (and various other places linked there). Closes #9585
2 parents 68e9d6c + fa8375b commit 180ad91

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

crates/cargo-test-support/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ git2 = "0.15.0"
1919
glob = "0.3"
2020
itertools = "0.10.0"
2121
lazy_static = "1.0"
22-
remove_dir_all = "0.5"
2322
serde_json = "1.0"
2423
tar = { version = "0.4.38", default-features = false }
2524
termcolor = "1.1.2"

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ impl CargoPathExt for Path {
141141
// actually performing the removal, but we don't care all that much
142142
// for our tests.
143143
if meta.is_dir() {
144-
if let Err(e) = remove_dir_all::remove_dir_all(self) {
144+
if let Err(e) = fs::remove_dir_all(self) {
145145
panic!("failed to remove {:?}: {:?}", self, e)
146146
}
147147
} else if let Err(e) = fs::remove_file(self) {

0 commit comments

Comments
 (0)