mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-14 06:40:39 +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,
|
ThemePreference::Light,
|
||||||
];
|
];
|
||||||
for pref in prefs {
|
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()
|
bat()
|
||||||
.arg("--color=always")
|
.arg("--color=always")
|
||||||
.arg(&format!("regression_tests/{filename}"))
|
.arg(format!("regression_tests/{filename}"))
|
||||||
.assert()
|
.assert()
|
||||||
.success();
|
.success();
|
||||||
}
|
}
|
||||||
@ -1845,7 +1845,7 @@ fn do_not_detect_different_syntax_for_stdin_and_files() {
|
|||||||
let cmd_for_file = bat()
|
let cmd_for_file = bat()
|
||||||
.arg("--color=always")
|
.arg("--color=always")
|
||||||
.arg("--map-syntax=*.js:Markdown")
|
.arg("--map-syntax=*.js:Markdown")
|
||||||
.arg(&format!("--file-name={file}"))
|
.arg(format!("--file-name={file}"))
|
||||||
.arg("--style=plain")
|
.arg("--style=plain")
|
||||||
.arg(file)
|
.arg(file)
|
||||||
.assert()
|
.assert()
|
||||||
@ -1855,7 +1855,7 @@ fn do_not_detect_different_syntax_for_stdin_and_files() {
|
|||||||
.arg("--color=always")
|
.arg("--color=always")
|
||||||
.arg("--map-syntax=*.js:Markdown")
|
.arg("--map-syntax=*.js:Markdown")
|
||||||
.arg("--style=plain")
|
.arg("--style=plain")
|
||||||
.arg(&format!("--file-name={file}"))
|
.arg(format!("--file-name={file}"))
|
||||||
.pipe_stdin(Path::new(EXAMPLES_DIR).join(file))
|
.pipe_stdin(Path::new(EXAMPLES_DIR).join(file))
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.assert()
|
.assert()
|
||||||
@ -1874,7 +1874,7 @@ fn no_first_line_fallback_when_mapping_to_invalid_syntax() {
|
|||||||
bat()
|
bat()
|
||||||
.arg("--color=always")
|
.arg("--color=always")
|
||||||
.arg("--map-syntax=*.invalid-syntax:InvalidSyntax")
|
.arg("--map-syntax=*.invalid-syntax:InvalidSyntax")
|
||||||
.arg(&format!("--file-name={file}"))
|
.arg(format!("--file-name={file}"))
|
||||||
.arg("--style=plain")
|
.arg("--style=plain")
|
||||||
.arg(file)
|
.arg(file)
|
||||||
.assert()
|
.assert()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user