Skip to content

Unnecessary Async Await (ARCH8025)

Key kotlin.async.unnecessary-async-await · Severity info · Category async

Flags async { x }.await() - a Deferred created only to be awaited immediately.

val user = async { repo.load(id) }.await()
val user = repo.load(id)

Call the suspend function directly; async is for work that runs concurrently with something else.