diff --git a/src/rules/expr/expr_tree.rs b/src/rules/expr/expr_tree.rs index e2d8d1d..519f137 100644 --- a/src/rules/expr/expr_tree.rs +++ b/src/rules/expr/expr_tree.rs @@ -103,16 +103,6 @@ impl ExprTree { where K: Clone, { - // Try to match against an empty suffix - // Note: We always do this, since some expressions could be - // of the form `(String, Pat, Empty)`, with `Pat` matching - // the rest. - if let Some((pat, key)) = suffixes.get("") && - let Some(pats) = Self::find_match_pat("", pat.as_ref()) - { - return Some((key.clone(), pats)); - } - // Otherwise, match against all other suffixes for (suffix, (pat, key)) in suffixes { // If the prefix no longer matches, try the next @@ -142,7 +132,7 @@ impl ExprTree { }, // Otherwise, we match if the value is empty - _ => match value.is_empty() { + None => match value.is_empty() { true => BTreeMap::new(), false => return None, },