Parcourir la source

Code cleanups in filetype detection

Ben S il y a 11 ans
Parent
commit
363d52dbb0
1 fichiers modifiés avec 2 ajouts et 7 suppressions
  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;
             }
         }