mirror of
https://github.com/sharkdp/bat
synced 2024-11-16 21:25:56 +00:00
Use unwrap
This commit is contained in:
parent
c477e23fe9
commit
83c7750656
@ -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
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user