Rellum Rellum

S0092: ? operand is not a Result

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

Explanation

The ? operator can only unwrap Result values. It extracts ok(v) for continued execution and returns err(e) early; non-Result values have no ok/err shape to inspect.

Common causes

Canonical fixes

Before:

value = count?

After:

value = count

Before:

value = maybe?

After:

value = match maybe
    some(v) => v
    none => fallback

Code example

value = count?