summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Otto <th1000s@posteo.net>2021-12-03 00:49:50 +0100
committerDan Davison <dandavison7@gmail.com>2021-12-02 20:33:35 -0500
commitb38c0f0bba33ab44c5643a880555c12699d216ca (patch)
tree2c2b96dcb394caaaa8c2fd84024db8706187d4bb
parentc8aa15d3515a123b0c5a89baf3ff674d81b04d73 (diff)
Fix new v1.57 clippy warnings0.10.3
-rw-r--r--src/utils/process.rs6
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"
});