mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-23 05:58:56 +01:00
fn mocked_pager: Simplify with format!
This commit is contained in:
parent
dd6f57e107
commit
c2c2b0211a
@ -54,9 +54,7 @@ fn get_mocked_pagers_dir() -> PathBuf {
|
||||
/// On Windows: 'most' -> 'most.bat'
|
||||
fn mocked_pager(base: &str) -> String {
|
||||
if cfg!(windows) {
|
||||
let mut str = String::from(base);
|
||||
str.push_str(".bat");
|
||||
str
|
||||
format!("{}.bat", base)
|
||||
} else {
|
||||
String::from(base)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user