Rellum Rellum

S0023: non-exhaustive match

Generated from rellum-diagnostics/src/db.rs.

Explanation

The compiler proves match exhaustiveness statically so every value has a defined result at runtime. A match that omits some Option, Result, Bool, enum, or record shape could otherwise reach a tick with no selected arm.

Common causes

Canonical fixes

Before:

match value
    some(x) => x

After:

match value
    some(x) => x
    none => 0

Before:

match flag
    true => 1

After:

match flag
    true => 1
    else => 0

Code example

match value
    some(x) => x