Use toTypedArray() instead of toList().toTypedArray()

Proprietary

toTypedArray() accepts any Collection; the intermediate toList() just allocates a list that's immediately discarded.

org.openrewrite.kotlin.bestpractices.UseToTypedArrayForToListThenToTypedArray$KtRecipe
mod run . --recipe='org.openrewrite.kotlin.bestpractices.UseToTypedArrayForToListThenToTypedArray$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.