Skip to content

Commit

Permalink
chore(downloader): Map directly to a set instead of converting a list
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastian Schuberth <sebastian@doubleopen.org>
  • Loading branch information
sschuberth committed May 16, 2024
1 parent b051095 commit 833dac3
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,7 @@ class DownloaderCommand : OrtCommand(

return licenseCategorizations
.filter { it.id in effectiveLicenses }
.flatMap { it.categories }
.toSet()
.flatMapTo(mutableSetOf()) { it.categories }
}

private fun downloadFromProjectUrl(projectUrl: String, failureMessages: MutableList<String>) {
Expand Down

0 comments on commit 833dac3

Please sign in to comment.