navigation

RecursiveAsyncFunction (FL0013)

Cause

Recursive async function ending in do! instead of return! is unsafe.

Rationale

If you end your recursive function with do! instead of return!, the compiler cannot perform tail-call optimization.

How To Fix

Use return! instead of do!

Rule Settings

{
    "recursiveAsyncFunction": {
        "enabled": false
    }
}