Rellum Rellum

S0007: event value used outside on-clause binding

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

Explanation

Event payloads exist only for ticks where that event fired. Reading an event as an ordinary pure value outside a binding triggered by that event would leave the program with no value on ticks where the event is absent.

Common causes

Canonical fixes

Before:

display = line
main! on line => print!(display)

After:

main! on line => print!(line)

Before:

display = line

After:

latest ~ feedback(
    on line => line,
    ""
)

Code example

display = line
main! on line => print!(display)