mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-19 04:21:06 +00:00
Fix unwrap error
This commit is contained in:
parent
f18009e5d5
commit
f84aceec3d
@ -100,8 +100,10 @@ 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);
|
||||||
let syntax = assets.syntax_for_file_name(test_file, &config.syntax_mapping).unwrap();
|
match assets.syntax_for_file_name(test_file, &config.syntax_mapping) {
|
||||||
syntax.name == lang_name
|
Some(syntax) => syntax.name == lang_name,
|
||||||
|
None => false,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user