From fa8375b3c94ba3b6df3da8b3c452ec50b5ba2ceb Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Thu, 3 Nov 2022 16:51:48 -0700 Subject: [PATCH] Remove remove_dir_all --- crates/cargo-test-support/Cargo.toml | 1 - crates/cargo-test-support/src/paths.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/cargo-test-support/Cargo.toml b/crates/cargo-test-support/Cargo.toml index 658bdf6dfa8..410e930d103 100644 --- a/crates/cargo-test-support/Cargo.toml +++ b/crates/cargo-test-support/Cargo.toml @@ -19,7 +19,6 @@ git2 = "0.15.0" glob = "0.3" itertools = "0.10.0" lazy_static = "1.0" -remove_dir_all = "0.5" serde_json = "1.0" tar = { version = "0.4.38", default-features = false } termcolor = "1.1.2" diff --git a/crates/cargo-test-support/src/paths.rs b/crates/cargo-test-support/src/paths.rs index d3a7ca8c6da..6925597a1da 100644 --- a/crates/cargo-test-support/src/paths.rs +++ b/crates/cargo-test-support/src/paths.rs @@ -141,7 +141,7 @@ impl CargoPathExt for Path { // actually performing the removal, but we don't care all that much // for our tests. if meta.is_dir() { - if let Err(e) = remove_dir_all::remove_dir_all(self) { + if let Err(e) = fs::remove_dir_all(self) { panic!("failed to remove {:?}: {:?}", self, e) } } else if let Err(e) = fs::remove_file(self) {