Explorar el Código

Code cleanups in filetype detection

Ben S hace 11 años
padre
commit
363d52dbb0
Se han modificado 1 ficheros con 2 adiciones y 7 borrados
  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;
             }
         }