Skip to content

Commit 3f47d10

Browse files
gavra0ilmirus
authored andcommitted
Fix style in classpath snapshot class
Use filterTo instead of filter followed by forEach.
1 parent 292d2d9 commit 3f47d10

File tree

1 file changed

+1
-3
lines changed
  • libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/kapt/incremental

1 file changed

+1
-3
lines changed

libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/internal/kapt/incremental/ClasspathSnapshot.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,7 @@ open class ClasspathSnapshot protected constructor(
9797

9898
// We do not compute structural data for unchanged files of the current snapshot for performance reasons.
9999
// That is why we reuse the previous snapshot as that one contains all unchanged entries.
100-
previousData.filter { !computedClasspathData.containsKey(it.key) }.forEach {
101-
computedClasspathData[it.key] = it.value
102-
}
100+
previousData.filterTo(computedClasspathData) { (key, _) -> key !in computedClasspathData }
103101

104102
val allImpactedClasses = findAllImpacted(changedClasses)
105103

0 commit comments

Comments
 (0)