prefer-match Prefer match over switch statements and repeated equality chains Repeated equality branches and switch cases encode selection as independent statements. Instead, you SHOULD use match to bind the selected value and its cases in one expression. - Category: style - Level: warning - Fix: none - Scope: module Reported function describe(value: int32): string { if (value === 0) { return "zero"; } else if (value === 1) { return "one"; } else if (value === 2) { return "two"; } return "many"; } Accepted function describe(value: int32): string { return match (value) { 0 => "zero" 1 => "one" 2 => "two" _ => "many" }; } language/linter/src/rules/style/prefermatch.rs:7