diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-30 18:31:44 +0000 |
commit | c23a457e72abe608715ac76f076f47dc42af07a5 (patch) | |
tree | 2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix-path/src/env | |
parent | Releasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip |
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-path/src/env')
-rw-r--r-- | vendor/gix-path/src/env/git.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/gix-path/src/env/git.rs b/vendor/gix-path/src/env/git.rs index 2e5d867bb..b8a9bc0d5 100644 --- a/vendor/gix-path/src/env/git.rs +++ b/vendor/gix-path/src/env/git.rs @@ -8,6 +8,7 @@ use bstr::{BStr, BString, ByteSlice}; /// Returns the file that contains git configuration coming with the installation of the `git` file in the current `PATH`, or `None` /// if no `git` executable was found or there were other errors during execution. pub(crate) fn install_config_path() -> Option<&'static BStr> { + let _span = gix_trace::detail!("gix_path::git::install_config_path()"); static PATH: once_cell::sync::Lazy<Option<BString>> = once_cell::sync::Lazy::new(|| { // Shortcut: in Msys shells this variable is set which allows to deduce the installation directory // so we can save the `git` invocation. @@ -23,7 +24,7 @@ pub(crate) fn install_config_path() -> Option<&'static BStr> { .stderr(Stdio::null()); first_file_from_config_with_origin(cmd.output().ok()?.stdout.as_slice().into()).map(ToOwned::to_owned) }); - PATH.as_ref().map(|b| b.as_ref()) + PATH.as_ref().map(AsRef::as_ref) } fn first_file_from_config_with_origin(source: &BStr) -> Option<&BStr> { |