Use toList() instead of toMutableList().toList()

Proprietary

toMutableList() already allocates a fresh list — wrapping it in another toList() copies it again. Go directly to toList().

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