mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-26 20:16:33 +00:00
Use 'if let' instead of 'match'
This commit is contained in:
1 parent
9e2ea5fdd4
commit
ec2722d465
1 file changed
+3
-6
+3
-6
@@ -91,12 +91,9 @@ pub fn list_languages(config: &Config) -> Result<()> {
|
||||
let configured_languages = get_syntax_mapping_to_paths(config.syntax_mapping.mappings());
|
||||
|
||||
for lang in languages.iter_mut() {
|
||||
match configured_languages.get(&lang.name) {
|
||||
Some(additional_paths) => {
|
||||
lang.file_extensions
|
||||
.extend(additional_paths.iter().cloned());
|
||||
}
|
||||
None => {}
|
||||
if let Some(additional_paths) = configured_languages.get(&lang.name) {
|
||||
lang.file_extensions
|
||||
.extend(additional_paths.iter().cloned());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user