Browse Source

Inline vars because I do not think it hinders legibility

sbatial 2 years ago
parent
commit
7d862c789a
1 changed files with 1 additions and 4 deletions
  1. 1 4
      src/options/filter.rs

+ 1 - 4
src/options/filter.rs

@@ -160,10 +160,7 @@ impl DotFilter {
     /// `--almost-all` binds stronger than multiple `--all` as we currently do not take the order
     /// of arguments into account and it is the safer option (does not clash with `--tree`)
     pub fn deduce(matches: &MatchedFlags<'_>) -> Result<Self, OptionsError> {
-        let all_count = matches.count(&flags::ALL);
-        let ls_all_count = matches.has(&flags::ALMOST_ALL)?;
-
-        match (all_count, ls_all_count) {
+        match (matches.count(&flags::ALL), matches.has(&flags::ALMOST_ALL)?) {
             (0, false) => Ok(Self::JustFiles),
 
             // either a single --all or at least one --almost-all is given