diff --git a/src/bin/bat/main.rs b/src/bin/bat/main.rs index 1fd43b85..a5b6f4f9 100644 --- a/src/bin/bat/main.rs +++ b/src/bin/bat/main.rs @@ -100,11 +100,8 @@ pub fn list_languages(config: &Config) -> Result<()> { true } else { let test_file = Path::new("test").with_extension(extension); - if let Some(syntax) = assets.syntax_for_file_name(test_file, &config.syntax_mapping) { - syntax.name == lang_name - } else { - false - } + let syntax = assets.syntax_for_file_name(test_file, &config.syntax_mapping).unwrap(); + syntax.name == lang_name } }); }