mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-19 04:21:06 +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
|
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
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user