Skip to content

Commit 27fccd3

Browse files
committed
Auto merge of #1207 - nindalf:master, r=alexcrichton
Replace remove_dir_all() from rustup-utils with crate remove_dir_all Fixes task #1204 Apologies if I misunderstood the task.
2 parents 69d9141 + 4dbddc5 commit 27fccd3

File tree

9 files changed

+26
-840
lines changed

9 files changed

+26
-840
lines changed

Cargo.lock

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ scopeguard = "0.3"
5252
sha2 = "0.6.0"
5353
toml = "0.1"
5454
wait-timeout = "0.1.5"
55+
remove_dir_all = "0.2.0"
5556

5657
[target."cfg(windows)".dependencies]
5758
winapi = "0.2.8"

src/rustup-dist/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ tempdir = "0.3.4"
2424
walkdir = "1.0"
2525
toml = "0.1.27"
2626
sha2 = "0.6.0"
27+
remove_dir_all = "0.2"
2728
rustup-utils = { path = "../rustup-utils" }
2829
error-chain = "0.10"
2930

src/rustup-dist/src/temp.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
extern crate remove_dir_all;
2+
13
use std::error;
24
use std::fs;
35
use std::path::{Path, PathBuf};
@@ -237,7 +239,7 @@ impl<'a> ops::Deref for File<'a> {
237239
impl<'a> Drop for Dir<'a> {
238240
fn drop(&mut self) {
239241
if raw::is_directory(&self.path) {
240-
let n = Notification::DirectoryDeletion(&self.path, fs::remove_dir_all(&self.path));
242+
let n = Notification::DirectoryDeletion(&self.path, remove_dir_all::remove_dir_all(&self.path));
241243
(self.cfg.notify_handler)(n);
242244
}
243245
}

src/rustup-utils/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ download = { path = "../download" }
1616
error-chain = "0.10"
1717
libc = "0.2.0"
1818
rand = "0.3.11"
19+
remove_dir_all = "0.2.0"
1920
rustc-serialize = "0.3.19"
2021
scopeguard = "0.3.0"
2122
semver = "0.7.0"

src/rustup-utils/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ pub mod raw;
3838
pub mod tty;
3939
pub mod utils;
4040
pub mod toml_utils;
41-
mod remove_dir_all;
4241

4342
pub use errors::*;
4443
pub use notifications::{Notification};

src/rustup-utils/src/raw.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
extern crate remove_dir_all;
2+
13
use std::char::from_u32;
24
use std::env;
35
use std::error;
@@ -309,7 +311,7 @@ pub fn remove_dir(path: &Path) -> io::Result<()> {
309311
// this is a custom implementation, more-or-less copied from cargo.
310312
// cc rust-lang/rust#31944
311313
// cc https://github.com/rust-lang/cargo/blob/master/tests/support/paths.rs#L52
312-
::remove_dir_all::remove_dir_all(path)
314+
remove_dir_all::remove_dir_all(path)
313315
}
314316
}
315317

0 commit comments

Comments
 (0)