Skip to content

Commit a61969d

Browse files
Merge pull request #36 from spastorino/minor-warning-fixes
Minor warning fixes
2 parents adf89aa + 874b887 commit a61969d

File tree

3 files changed

+121
-5
lines changed

3 files changed

+121
-5
lines changed

Cargo.lock

Lines changed: 118 additions & 3 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
@@ -12,6 +12,7 @@ version = "0.1.0"
1212

1313
[dependencies]
1414
dialoguer = "0.3.0"
15+
dirs = "2.0"
1516
env_logger = "0.6.0"
1617
failure = "0.1"
1718
flate2 = "1.0.1"

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
extern crate chrono;
99
extern crate dialoguer;
10+
extern crate dirs;
1011
extern crate env_logger;
1112
#[macro_use]
1213
extern crate failure;
@@ -18,7 +19,6 @@ extern crate pbr;
1819
#[cfg(test)]
1920
extern crate quickcheck;
2021
extern crate reqwest;
21-
#[macro_use]
2222
extern crate structopt;
2323
extern crate tar;
2424
extern crate tee;
@@ -664,7 +664,7 @@ impl Config {
664664
let mut toolchains_path = match env::var_os("RUSTUP_HOME") {
665665
Some(h) => PathBuf::from(h),
666666
None => {
667-
let mut home = env::home_dir().ok_or_else(|| format_err!("Could not find home."))?;
667+
let mut home = dirs::home_dir().ok_or_else(|| format_err!("Could not find home."))?;
668668
home.push(".rustup");
669669
home
670670
}

0 commit comments

Comments
 (0)