Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl Display for ErrorKind {
Ok(())
}
ErrorKind::UnexpectedArgument(arg) => {
write!(f, "Found an invalid argument '{}'.", arg)
write!(f, "Found an invalid argument '{arg}'.")
}
ErrorKind::UnexpectedValue { option, value } => {
write!(
Expand Down
4 changes: 2 additions & 2 deletions src/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ pub fn print_flags(
}
};
let help_indent = " ".repeat(width - flags.len() + 2);
writeln!(w, "{}{}", help_indent, line).unwrap();
writeln!(w, "{help_indent}{line}").unwrap();
} else {
writeln!(w).unwrap();
}

let help_indent = " ".repeat(width + indent_size + 2);
for line in help_lines {
writeln!(w, "{}{}", help_indent, line).unwrap();
writeln!(w, "{help_indent}{line}").unwrap();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/positional.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ fn assert_empty<T: Debug>(mut operands: Vec<T>) -> Result<(), Error> {
if let Some(arg) = operands.pop() {
return Err(Error {
exit_code: 1,
kind: ErrorKind::UnexpectedArgument(format!("{:?}", arg)),
kind: ErrorKind::UnexpectedArgument(format!("{arg:?}")),
});
}
Ok(())
Expand Down
3 changes: 1 addition & 2 deletions tests/coreutils/cksum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ fn assert_format(args: &[&str], expected: ResultingFormat) {
assert_eq!(
(result.0.format(), result.1.as_slice()),
(expected, [].as_slice()),
"{:?}",
args
"{args:?}"
);
}

Expand Down
Loading