Use distinct() instead of toSet().toList()

Proprietary

Round-tripping through a Set to drop duplicates obscures intent and allocates an intermediate. distinct() says what it does and returns a List directly.

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