1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-01-19 04:21:06 +00:00

Use unwrap

This commit is contained in:
Kienyew 2020-09-06 23:04:51 +08:00 committed by David Peter
parent c477e23fe9
commit 83c7750656

View File

@ -100,11 +100,8 @@ pub fn list_languages(config: &Config) -> Result<()> {
true true
} else { } else {
let test_file = Path::new("test").with_extension(extension); let test_file = Path::new("test").with_extension(extension);
if let Some(syntax) = assets.syntax_for_file_name(test_file, &config.syntax_mapping) { let syntax = assets.syntax_for_file_name(test_file, &config.syntax_mapping).unwrap();
syntax.name == lang_name syntax.name == lang_name
} else {
false
}
} }
}); });
} }