diff options
author | Thomas Otto <th1000s@posteo.net> | 2021-12-03 00:49:50 +0100 |
---|---|---|
committer | Dan Davison <dandavison7@gmail.com> | 2021-12-02 20:33:35 -0500 |
commit | b38c0f0bba33ab44c5643a880555c12699d216ca (patch) | |
tree | 2c2b96dcb394caaaa8c2fd84024db8706187d4bb /src/utils/process.rs | |
parent | c8aa15d3515a123b0c5a89baf3ff674d81b04d73 (diff) |
Fix new v1.57 clippy warnings0.10.3
Diffstat (limited to 'src/utils/process.rs')
-rw-r--r-- | src/utils/process.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/utils/process.rs b/src/utils/process.rs index 63021b06..2408ef74 100644 --- a/src/utils/process.rs +++ b/src/utils/process.rs @@ -26,9 +26,7 @@ pub struct CommandLine { pub fn calling_process() -> Option<Cow<'static, CallingProcess>> { #[cfg(not(test))] { - CACHED_CALLING_PROCESS - .as_ref() - .map(|proc| Cow::Borrowed(proc)) + CACHED_CALLING_PROCESS.as_ref().map(Cow::Borrowed) } #[cfg(test)] { @@ -94,7 +92,7 @@ pub fn describe_calling_process(args: &[String]) -> ProcessArgs<CallingProcess> match args.next() { Some(command) => match Path::new(command).file_stem() { - Some(s) if s.to_str().map(|s| is_git_binary(s)).unwrap_or(false) => { + Some(s) if s.to_str().map(is_git_binary).unwrap_or(false) => { let mut args = args.skip_while(|s| { *s != "diff" && *s != "show" && *s != "log" && *s != "reflog" && *s != "grep" }); |