Browse Source

Code cleanups in filetype detection

Ben S 11 years ago
parent
commit
363d52dbb0
1 changed files with 2 additions and 7 deletions
  1. 2 7
      src/filetype.rs

+ 2 - 7
src/filetype.rs

@@ -132,13 +132,8 @@ impl<'a> HasType for File<'a> {
             else if source_files.iter().any(|path| self.dir.map(|d| d.contains(path)).unwrap_or(false)) {
                 return Temp;
             }
-            else {
-                if COMPILED_TYPES.iter().any(|&s| s == *ext) {
-                    return Compiled;
-                }
-                else {
-                    return Normal;
-                }
+            else if COMPILED_TYPES.iter().any(|&s| s == *ext) {
+                return Compiled;
             }
         }