Conditionals
Keep successful paths readable and make closed alternatives explicit.
Branching
Why
An exhaustive match makes a newly added enum variant visible to callers at compile time.
Rules
MUST return early from invalid preconditions.[review]
MUST match closed domain enums exhaustively.[review]
MUST avoid wildcard arms that hide an unhandled repository-owned enum variant.[review]
MUST useif letfor a genuinely partial match andmatchwhen every alternative matters.[review]
MUST consume the narrowed variant rather than recover it with unchecked extraction.[review]
MUST avoid nested conditionals around the successful operation.[review]
[review]
The compiler establishes exhaustive matching. Review distinguishes deliberate partial handling from missing cases.
Enforcement
The compiler establishes exhaustive matching. Review distinguishes deliberate partial handling from missing cases.