prefer-nested-or-pattern Prefer nesting or-patterns inside their shared nominal pattern Repeating the same nominal pattern in every or-pattern branch obscures the field that varies. Instead, you SHOULD place the alternatives in the shared field pattern. - Category: style - Level: warning - Fix: automatic - Scope: module Reported function isSmall(result: Result): boolean { return match (result) { Ok { value: 0 } | Ok { value: 1 } => true _ => false }; } Accepted function isSmall(result: Result): boolean { return match (result) { Ok { value: 0 | 1 } => true _ => false }; } Prior art - Clippy ยท unnestedorpatterns language/linter/src/rules/style/prefernestedorpattern.rs:8