Rellum Rellum

S0053: ok pattern requires Result

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

Explanation

The ok(...) pattern extracts the success payload from a Result value. It cannot match Option, Bool, enum, record, or scalar values because those types do not have Result's ok/err shape.

Common causes

Canonical fixes

Before:

match value
    ok(x) => x

After:

match result
    ok(x) => x
    err(_) => fallback

Before:

match value
    ok(x) => x

After:

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

Code example

match value
    ok(x) => x