1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-03 20:02:28 +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:
Yuri Astrakhan
2025-02-27 00:30:05 -05:00
committed by Martin Nordholts
parent 9824090654
commit d9fbd18541
14 changed files with 32 additions and 45 deletions

View File

@@ -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(' ');