fn mocked_pager: Simplify with format!

This commit is contained in:
Martin Nordholts 2021-01-10 13:26:40 +01:00
parent dd6f57e107
commit c2c2b0211a

View File

@ -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)
}