From 1fbdef06aae65927e27a076b18ca922f0901c59e Mon Sep 17 00:00:00 2001 From: sharkdp Date: Mon, 23 Nov 2020 13:38:11 +0100 Subject: [PATCH] =?UTF-8?q?Use=20unreachable!(=E2=80=A6)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/bin/bat/app.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index b9992b49..a25e41d2 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -169,7 +169,8 @@ impl App { || match self.matches.value_of("color") { Some("always") => true, Some("never") => false, - _ => env::var_os("NO_COLOR").is_none() && self.interactive_output, + Some("auto") => env::var_os("NO_COLOR").is_none() && self.interactive_output, + _ => unreachable!("other values for --color are not allowed"), }, paging_mode, term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),