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
749d5be35a
Se han modificado 1 ficheros con 1 adiciones y 4 borrados
  1. 1 4
      src/options/filter.rs

+ 1 - 4
src/options/filter.rs

@@ -33,10 +33,7 @@ impl SortField {
         let Some(word) = matches.get(&flags::SORT)? else { return Ok(Self::default()) };
 
         // Get String because we can’t match an OsStr
-        let word = match word.to_str() {
-            Some(w)  => w,
-            None     => return Err(OptionsError::BadArgument(&flags::SORT, word.into()))
-        };
+        let Some(word) = word.to_str() else { return Err(OptionsError::BadArgument(&flags::SORT, word.into())) };
 
         let field = match word {
             "name" | "filename" => {