Skip to content

Commit

Permalink
refactor: clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
jpgrayson committed Sep 8, 2024
1 parent 92e916a commit 5d29e05
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cmd/completion/man.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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-") {
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/wrap/partialrefname.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ pub(crate) fn partial_ref_name(input: &mut &str) -> PResult<PartialRefName> {
input.next_token();
split_offset -= 1;
}
if input[..split_offset].ends_with(|c| matches!(c, '.' | '/')) {
if input[..split_offset].ends_with(['.', '/']) {
split_offset -= 1;
}

Expand Down

0 comments on commit 5d29e05

Please sign in to comment.