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
684b15aeb6
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1 4
      src/options/theme.rs

+ 1 - 4
src/options/theme.rs

@@ -27,10 +27,7 @@ impl UseColours {
             None => Self::Automatic,
         };
 
-        let word = match matches.get_where(|f| f.matches(&flags::COLOR) || f.matches(&flags::COLOUR))? {
-            Some(w)  => w,
-            None => return Ok(default_value),
-        };
+        let Some(word) = matches.get_where(|f| f.matches(&flags::COLOR) || f.matches(&flags::COLOUR))? else { return Ok(default_value) };
 
         if word == "always" {
             Ok(Self::Always)