From c89984910172d1a8bcd245861e66c2860eca6c38 Mon Sep 17 00:00:00 2001 From: sharkdp Date: Mon, 23 Jul 2018 21:19:47 +0200 Subject: [PATCH] Use map instead of and_then(..Some(..)) --- src/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app.rs b/src/app.rs index 0d4f6150..41594dd7 100644 --- a/src/app.rs +++ b/src/app.rs @@ -286,7 +286,7 @@ impl App { theme: self .matches .value_of("theme") - .and_then(|theme_name_arg| Some(String::from(theme_name_arg))) + .map(String::from) .or_else(|| { env::var("BAT_THEME").ok().and_then(|theme_name_env| { if HighlightingAssets::new().theme_exists(&theme_name_env) {