Skip to content

Commit 5b206bc

Browse files
committed
Make ALTERNATIVE_LOCATIONS items PathBuf
Instead of directly OsString. This is because these locations are paths. Representing them this way has the further advantage of allowing some code to be slightly simplified.
1 parent edc1351 commit 5b206bc

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

gix-path/src/env/git.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::ffi::OsString;
21
use std::path::{Path, PathBuf};
32
use std::process::{Command, Stdio};
43

@@ -7,14 +6,14 @@ use once_cell::sync::Lazy;
76

87
/// Other places to find Git in.
98
#[cfg(windows)]
10-
pub(super) static ALTERNATIVE_LOCATIONS: Lazy<Vec<OsString>> = Lazy::new(|| {
9+
pub(super) static ALTERNATIVE_LOCATIONS: Lazy<Vec<PathBuf>> = Lazy::new(|| {
1110
vec![
1211
"C:/Program Files/Git/mingw64/bin".into(),
1312
"C:/Program Files (x86)/Git/mingw32/bin".into(),
1413
]
1514
});
1615
#[cfg(not(windows))]
17-
pub(super) static ALTERNATIVE_LOCATIONS: Lazy<Vec<OsString>> = Lazy::new(|| vec![]);
16+
pub(super) static ALTERNATIVE_LOCATIONS: Lazy<Vec<PathBuf>> = Lazy::new(|| vec![]);
1817

1918
#[cfg(windows)]
2019
pub(super) static EXE_NAME: &str = "git.exe";

0 commit comments

Comments
 (0)