mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 12:05:11 +00:00
Add guard to get_source_files
This commit is contained in:
parent
c494c0cd22
commit
0a1d3f56ec
@ -69,6 +69,10 @@ impl<'a> File<'a> {
|
||||
// without a .coffee.
|
||||
|
||||
pub fn get_source_files(&self) -> Vec<Path> {
|
||||
if self.ext.is_none() {
|
||||
return vec![];
|
||||
}
|
||||
|
||||
let ext = self.ext.clone().unwrap();
|
||||
match ext.as_slice() {
|
||||
"class" => vec![self.path.with_extension("java")], // Java
|
||||
|
Loading…
Reference in New Issue
Block a user