Find map { it.await() } over List<Deferred<T>>

Proprietary

Sequential .map { it.await() } waits for each Deferred in turn and rethrows the first exception only after every earlier element completes. awaitAll() waits concurrently and rethrows immediately on the first failure.

org.openrewrite.kotlin.coroutines.FindMapAwait$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.coroutines.FindMapAwait$KtRecipe'

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.