on master help sign in
Use unreachable!(…)
commit1fbdef06aae65927e27a076b18ca922f0901c59e authorsharkdp <davidpeter@web.de> dateMon 23 Nov 2020, 13:38 (6 years ago) parentf5531cc
1 file changed+2−1
src/bin/bat/app.rs+2−1
src/bin/bat/app.rs+2−1
@@ -169,7 +169,8 @@ impl App {
169169 || match self.matches.value_of("color") {
170170 Some("always") => true,
171171 Some("never") => false,
172− _ => env::var_os("NO_COLOR").is_none() && self.interactive_output,
172+ Some("auto") => env::var_os("NO_COLOR").is_none() && self.interactive_output,
173+ _ => unreachable!("other values for --color are not allowed"),
173174 },
174175 paging_mode,
175176 term_width: maybe_term_width.unwrap_or(Term::stdout().size().1 as usize),