KotlinProjectTraversingService: Remove unnecessary HashSet copying
As the stream is already collected to a modifiable HashSet, there's no need to copy the set again.
@@ -100,11 +100,10 @@ public final class KotlinProjectTraversingService {
if (targetIdeInfo != null) {
ArrayDeque<Dependency> deps = new ArrayDeque<>(targetIdeInfo.getDependencies());
Set<Label> seenDeps =
- new HashSet<>(
deps.stream()
.map(Dependency::getTargetKey)
.map(TargetKey::getLabel)
- .collect(toCollection(HashSet::new)));
+ .collect(toCollection(HashSet::new));
while (!deps.isEmpty()) {
Dependency dep = deps.poll();
