summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-07-04 11:57:47 -0700
committerAlex Crichton <alex@alexcrichton.com>2019-07-04 11:57:47 -0700
commit85958b001dbff8523396809bfa844fc34a7869a8 (patch)
tree4fb6d6975fba0e0ca154ee894043c4169a554d88
parentf4f24876f79339404c94ece8a8fed8117b00d4e7 (diff)
downloadrust-installer-85958b001dbff8523396809bfa844fc34a7869a8.tar.gz
Fix Windows build
-rw-r--r--Cargo.toml1
-rw-r--r--src/lib.rs3
-rw-r--r--src/util.rs2
3 files changed, 2 insertions, 4 deletions
diff --git a/Cargo.toml b/Cargo.toml
index d62cc58..37dcbb5 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -17,6 +17,7 @@ tar = "0.4.13"
walkdir = "2"
xz2 = "0.1.4"
num_cpus = "1"
+remove_dir_all = "0.5"
[dependencies.clap]
features = ["yaml"]
diff --git a/src/lib.rs b/src/lib.rs
index 39a613a..0310aba 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -3,9 +3,6 @@ pub type Result<T> = std::result::Result<T, failure::Error>;
#[macro_use]
mod util;
-// deal with OS complications (cribbed from rustup.rs)
-mod remove_dir_all;
-
mod combiner;
mod generator;
mod scripter;
diff --git a/src/util.rs b/src/util.rs
index 8c1a9ca..868a636 100644
--- a/src/util.rs
+++ b/src/util.rs
@@ -83,7 +83,7 @@ pub fn open_file<P: AsRef<Path>>(path: P) -> Result<fs::File> {
/// Wraps `remove_dir_all` with a nicer error message.
pub fn remove_dir_all<P: AsRef<Path>>(path: P) -> Result<()> {
- crate::remove_dir_all::remove_dir_all(path.as_ref())
+ remove_dir_all::remove_dir_all(path.as_ref())
.with_context(|_| format!("failed to remove dir '{}'", path.as_ref().display()))?;
Ok(())
}