diff --git a/src/cmd/completion/man.rs b/src/cmd/completion/man.rs index 64733390..ba5f944c 100644 --- a/src/cmd/completion/man.rs +++ b/src/cmd/completion/man.rs @@ -389,7 +389,7 @@ fn add_options( fn make_links(text: &str) -> String { let mut output = String::new(); - let mut words = text.split_inclusive(|c| c == ' ' || c == '\n'); + let mut words = text.split_inclusive([' ', '\n']); while let Some(word) = words.next() { if let Some(remainder) = word.strip_prefix("git-") { diff --git a/src/main.rs b/src/main.rs index cc979d8c..49f79352 100644 --- a/src/main.rs +++ b/src/main.rs @@ -379,7 +379,7 @@ fn execute_shell_alias( if user_args.is_empty() { command.arg(&alias.command); } else { - command.arg(&format!("{} \"$@\"", &alias.command)); + command.arg(format!("{} \"$@\"", &alias.command)); command.arg(&alias.command); } command diff --git a/src/wrap/partialrefname.rs b/src/wrap/partialrefname.rs index c6374915..6f069054 100644 --- a/src/wrap/partialrefname.rs +++ b/src/wrap/partialrefname.rs @@ -95,7 +95,7 @@ pub(crate) fn partial_ref_name(input: &mut &str) -> PResult { input.next_token(); split_offset -= 1; } - if input[..split_offset].ends_with(|c| matches!(c, '.' | '/')) { + if input[..split_offset].ends_with(['.', '/']) { split_offset -= 1; }