mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-02 03:12:25 +01:00
inline format arguments
In a few cases, removed the unneeded `&` - this causes a minor slowdown because compiler cannot eliminate those (yet).
This commit is contained in:
committed by
Martin Nordholts
parent
9824090654
commit
d9fbd18541
@@ -75,7 +75,7 @@ fn create_sample_directory() -> Result<TempDir, git2::Error> {
|
||||
|
||||
// Copy over `sample.rs`
|
||||
let sample_path = temp_dir.path().join("sample.rs");
|
||||
println!("{:?}", &sample_path);
|
||||
println!("{sample_path:?}");
|
||||
fs::copy("tests/snapshots/sample.rs", &sample_path).expect("successful copy");
|
||||
|
||||
// Commit
|
||||
|
@@ -19,7 +19,7 @@ fn get_mocked_pagers_dir() -> PathBuf {
|
||||
pub fn from(base: &str) -> String {
|
||||
let mut cmd_and_args = shell_words::split(base).unwrap();
|
||||
let suffix = if cfg!(windows) { ".bat" } else { "" };
|
||||
let mut out_cmd = format!("{}{}", cmd_and_args.first().unwrap(), suffix);
|
||||
let mut out_cmd = format!("{}{suffix}", cmd_and_args.first().unwrap());
|
||||
|
||||
if (cmd_and_args.len() > 1) {
|
||||
out_cmd.push(' ');
|
||||
|
Reference in New Issue
Block a user