mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-21 12:28:30 +00: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'
|
/// On Windows: 'most' -> 'most.bat'
|
||||||
fn mocked_pager(base: &str) -> String {
|
fn mocked_pager(base: &str) -> String {
|
||||||
if cfg!(windows) {
|
if cfg!(windows) {
|
||||||
let mut str = String::from(base);
|
format!("{}.bat", base)
|
||||||
str.push_str(".bat");
|
|
||||||
str
|
|
||||||
} else {
|
} else {
|
||||||
String::from(base)
|
String::from(base)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user