mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
Inline format!
args wherever possible
This commit is contained in:
@@ -1758,7 +1758,7 @@ fn do_not_panic_regression_tests() {
|
||||
] {
|
||||
bat()
|
||||
.arg("--color=always")
|
||||
.arg(&format!("regression_tests/{}", filename))
|
||||
.arg(&format!("regression_tests/{filename}"))
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
@@ -1771,7 +1771,7 @@ fn do_not_detect_different_syntax_for_stdin_and_files() {
|
||||
let cmd_for_file = bat()
|
||||
.arg("--color=always")
|
||||
.arg("--map-syntax=*.js:Markdown")
|
||||
.arg(&format!("--file-name={}", file))
|
||||
.arg(&format!("--file-name={file}"))
|
||||
.arg("--style=plain")
|
||||
.arg(file)
|
||||
.assert()
|
||||
@@ -1781,7 +1781,7 @@ fn do_not_detect_different_syntax_for_stdin_and_files() {
|
||||
.arg("--color=always")
|
||||
.arg("--map-syntax=*.js:Markdown")
|
||||
.arg("--style=plain")
|
||||
.arg(&format!("--file-name={}", file))
|
||||
.arg(&format!("--file-name={file}"))
|
||||
.pipe_stdin(Path::new(EXAMPLES_DIR).join(file))
|
||||
.unwrap()
|
||||
.assert()
|
||||
@@ -1800,7 +1800,7 @@ fn no_first_line_fallback_when_mapping_to_invalid_syntax() {
|
||||
bat()
|
||||
.arg("--color=always")
|
||||
.arg("--map-syntax=*.invalid-syntax:InvalidSyntax")
|
||||
.arg(&format!("--file-name={}", file))
|
||||
.arg(&format!("--file-name={file}"))
|
||||
.arg("--style=plain")
|
||||
.arg(file)
|
||||
.assert()
|
||||
@@ -1998,7 +1998,7 @@ fn ansi_passthrough_emit() {
|
||||
.arg("--paging=never")
|
||||
.arg("--color=never")
|
||||
.arg("--terminal-width=80")
|
||||
.arg(format!("--wrap={}", wrapping))
|
||||
.arg(format!("--wrap={wrapping}"))
|
||||
.arg("--decorations=always")
|
||||
.arg("--style=plain")
|
||||
.write_stdin("\x1B[33mColor\nColor \x1B[m\nPlain\n")
|
||||
|
Reference in New Issue
Block a user