mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-12 22:00:38 +01:00
Fix clippy::needless_borrows_for_generic_args
warnings
This commit is contained in:
parent
db812e1179
commit
6cf747678c
@ -509,7 +509,7 @@ mod tests {
|
||||
ThemePreference::Light,
|
||||
];
|
||||
for pref in prefs {
|
||||
assert_eq!(pref, ThemePreference::new(&pref.to_string()));
|
||||
assert_eq!(pref, ThemePreference::new(pref.to_string()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1832,7 +1832,7 @@ fn do_not_panic_regression_tests() {
|
||||
] {
|
||||
bat()
|
||||
.arg("--color=always")
|
||||
.arg(&format!("regression_tests/{filename}"))
|
||||
.arg(format!("regression_tests/{filename}"))
|
||||
.assert()
|
||||
.success();
|
||||
}
|
||||
@ -1845,7 +1845,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()
|
||||
@ -1855,7 +1855,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()
|
||||
@ -1874,7 +1874,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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user