Use Box<Path> in lieu of PathBuf for immutable structs (#12346)
## Summary I don't know if I actually want to commit this, but I did it on the plane last time and just polished it off (got it to compile) while waiting to board.
This commit is contained in:
@@ -33,9 +33,9 @@ pub enum GitError {
|
||||
|
||||
/// A global cache of the result of `which git`.
|
||||
pub static GIT: LazyLock<Result<PathBuf, GitError>> = LazyLock::new(|| {
|
||||
which::which("git").map_err(|e| match e {
|
||||
which::which("git").map_err(|err| match err {
|
||||
which::Error::CannotFindBinaryPath => GitError::GitNotFound,
|
||||
e => GitError::Other(e),
|
||||
err => GitError::Other(err),
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user