Skip to content

Commit 248251b

Browse files
committed
Use home::cargo_home
1 parent 20b7351 commit 248251b

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

clippy_dev/Cargo.toml

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ regex = "1"
1111
lazy_static = "1.0"
1212
shell-escape = "0.1"
1313
walkdir = "2"
14+
# FIXME: remove this once cargo issue #7475 is fixed
15+
home = "0.5"

clippy_dev/src/fmt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ fn project_root() -> Result<PathBuf, CliError> {
202202
// Workaround for https://github.com/rust-lang/cargo/issues/7475.
203203
// FIXME: replace `&bin_path("command")` with `"command"` once the issue is fixed
204204
fn bin_path(bin: &str) -> String {
205-
let mut p = PathBuf::from(std::env::var_os("CARGO_HOME").unwrap());
205+
let mut p = home::cargo_home().unwrap();
206206
p.push("bin");
207207
p.push(bin);
208208
p.display().to_string()

0 commit comments

Comments
 (0)