Explorar o código

Code cleanups in filetype detection

Ben S %!s(int64=11) %!d(string=hai) anos
pai
achega
363d52dbb0
Modificáronse 1 ficheiros con 2 adicións e 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;
             }
         }