about summary refs log tree commit diff
path: root/clippy_lints/src/unnested_or_patterns.rs
diff options
context:
space:
mode:
Diffstat (limited to 'clippy_lints/src/unnested_or_patterns.rs')
-rw-r--r--clippy_lints/src/unnested_or_patterns.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/clippy_lints/src/unnested_or_patterns.rs b/clippy_lints/src/unnested_or_patterns.rs
index fb73c386640..b305dae7608 100644
--- a/clippy_lints/src/unnested_or_patterns.rs
+++ b/clippy_lints/src/unnested_or_patterns.rs
@@ -163,9 +163,8 @@ fn unnest_or_patterns(pat: &mut P<Pat>) -> bool {
             noop_visit_pat(p, self);
 
             // Don't have an or-pattern? Just quit early on.
-            let alternatives = match &mut p.kind {
-                Or(ps) => ps,
-                _ => return,
+            let Or(alternatives) = &mut p.kind else {
+                return
             };
 
             // Collapse or-patterns directly nested in or-patterns.