Skip to content

Commit 5d29e05

Browse files
committed
refactor: clippy lints
1 parent 92e916a commit 5d29e05

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/cmd/completion/man.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ fn add_options(
389389

390390
fn make_links(text: &str) -> String {
391391
let mut output = String::new();
392-
let mut words = text.split_inclusive(|c| c == ' ' || c == '\n');
392+
let mut words = text.split_inclusive([' ', '\n']);
393393

394394
while let Some(word) = words.next() {
395395
if let Some(remainder) = word.strip_prefix("git-") {

src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ fn execute_shell_alias(
379379
if user_args.is_empty() {
380380
command.arg(&alias.command);
381381
} else {
382-
command.arg(&format!("{} \"$@\"", &alias.command));
382+
command.arg(format!("{} \"$@\"", &alias.command));
383383
command.arg(&alias.command);
384384
}
385385
command

src/wrap/partialrefname.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub(crate) fn partial_ref_name(input: &mut &str) -> PResult<PartialRefName> {
9595
input.next_token();
9696
split_offset -= 1;
9797
}
98-
if input[..split_offset].ends_with(|c| matches!(c, '.' | '/')) {
98+
if input[..split_offset].ends_with(['.', '/']) {
9999
split_offset -= 1;
100100
}
101101

0 commit comments

Comments
 (0)