Add guard to get_source_files

This commit is contained in:
Ben S 2014-06-30 02:00:05 +01:00
parent c494c0cd22
commit 0a1d3f56ec

View File

@ -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