From 9c782fb692705aefb66cfa48f6ecc9896df18a2f Mon Sep 17 00:00:00 2001 From: Park Juhyung Date: Sun, 21 Oct 2018 20:15:17 +0900 Subject: [PATCH] Fix format error --- src/clap_app.rs | 2 +- src/output.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/clap_app.rs b/src/clap_app.rs index 7127d178..c7bd015b 100644 --- a/src/clap_app.rs +++ b/src/clap_app.rs @@ -220,7 +220,7 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> { .help("Set pager") .long_help( "Set which pager is used. This option will overwrite \ - PAGER or BAT_PAGER environment variables.", + PAGER or BAT_PAGER environment variables.", ), ) .arg( diff --git a/src/output.rs b/src/output.rs index 66913abf..be0d4af1 100644 --- a/src/output.rs +++ b/src/output.rs @@ -26,9 +26,9 @@ impl OutputType { /// Try to launch the pager. Fall back to stdout in case of errors. fn try_pager(quit_if_one_screen: bool, pager_from_config: Option<&str>) -> Result { - let pager_from_env = env::var("BAT_PAGER") - .or_else(|_| env::var("PAGER")); - let pager = pager_from_config.map(|p| p.to_string()) + let pager_from_env = env::var("BAT_PAGER").or_else(|_| env::var("PAGER")); + let pager = pager_from_config + .map(|p| p.to_string()) .or(pager_from_env.ok()) .unwrap_or(String::from("less"));