Use distinct() instead of toSet().toList()
ProprietaryRound-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$KtRecipemod 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.