Use toList() instead of toMutableList().toList()
ProprietarytoMutableList() already allocates a fresh list — wrapping it in another toList() copies it again. Go directly to toList().
org. openrewrite. kotlin. stdlib. UseToListForListToList$KtRecipemod 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.