W0023: multiple effects have unspecified relative order
Generated from rellum-diagnostics/src/db.rs.
Explanation
Independent effect bindings that can fire from the same trigger are scheduled in the same tick without a guaranteed relative order. If both perform external side effects, relying on their order is unsafe.
Common causes
- splitting ordered writes across separate ! bindings
- triggering several external resource effects from the same event
Canonical fixes
- combine ordered side effects into one effect body and sequence them explicitly
Before:
log! on data => write!(log_path, data)
backup! on data => write!(backup_path, data)
After:
persist! on data => {
write!(log_path, data)
write!(backup_path, data)
}
Code example
log! on data => write!(log_path, data)
backup! on data => write!(backup_path, data)