Skip to content

Commit 3180142

Browse files
committed
Avoid explicitly using home where gix-path can be used.
1 parent 74cb5ee commit 3180142

File tree

4 files changed

+2
-4
lines changed

4 files changed

+2
-4
lines changed

Cargo.lock

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

gix-sec/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ libc = "0.2.123"
2727

2828
[target.'cfg(windows)'.dependencies]
2929
gix-path = { version = "^0.7.1", path = "../gix-path" }
30-
home = "0.5.4"
3130
windows = { version = "0.48", features = [
3231
"Win32_Foundation",
3332
"Win32_Security_Authorization",

gix-sec/src/identity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ mod impl_ {
9090
// Home is not actually owned by the corresponding user
9191
// but it can be considered de-facto owned by the user
9292
// Ignore errors here and just do the regular checks below
93-
if gix_path::realpath(path).ok() == home::home_dir() {
93+
if gix_path::realpath(path).ok() == gix_path::env::home_dir() {
9494
return Ok(true);
9595
}
9696

gix-sec/tests/identity/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn is_path_owned_by_current_user() -> crate::Result {
1111
#[test]
1212
#[cfg(windows)]
1313
fn windows_home() -> crate::Result {
14-
let home = home::home_dir().expect("home dir is available");
14+
let home = gix_path::env::home_dir().expect("home dir is available");
1515
assert!(gix_sec::identity::is_path_owned_by_current_user(home)?);
1616
Ok(())
1717
}

0 commit comments

Comments
 (0)