Explorar el Código

refactor(clippy): clippy::manual_let_else

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen hace 2 años
padre
commit
40941acb95
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1 4
      src/options/filter.rs

+ 1 - 4
src/options/filter.rs

@@ -184,10 +184,7 @@ impl IgnorePatterns {
 
         // If there are no inputs, we return a set of patterns that doesn’t
         // match anything, rather than, say, `None`.
-        let inputs = match matches.get(&flags::IGNORE_GLOB)? {
-            Some(is)  => is,
-            None      => return Ok(Self::empty()),
-        };
+        let Some(inputs) = matches.get(&flags::IGNORE_GLOB)? else { return Ok(Self::empty()) };
 
         // Awkwardly, though, a glob pattern can be invalid, and we need to
         // deal with invalid patterns somehow.