A warning: the function declares an effect it never uses. Declaring only what a function
needs keeps callers and the package's raft.toml accurate. It doesn't fail auk check; the
fix removes the unused effect.
Wrong#
fn double(n: int): int uses fs = n * 2
fn main() uses fs { print(double(2)) }Fixed#
fn double(n: int): int = n * 2
fn main() { print(double(2)) }Common causes#
- An effect left behind after the code using it was removed or moved.
- Declaring effects "just in case": add them when the code needs them.