Fix style in classpath snapshot class

Use filterTo instead of filter followed by forEach.
This commit is contained in:
Ivan Gavrilovic
2019-04-11 13:40:41 -07:00
committed by Alexey Tsvetkov
parent c28ad116d0
commit 33e7a23208
@@ -97,9 +97,7 @@ open class ClasspathSnapshot protected constructor(
// We do not compute structural data for unchanged files of the current snapshot for performance reasons.
// That is why we reuse the previous snapshot as that one contains all unchanged entries.
previousData.filter { !computedClasspathData.containsKey(it.key) }.forEach {
computedClasspathData[it.key] = it.value
}
previousData.filterTo(computedClasspathData) { (key, _) -> key !in computedClasspathData }
val allImpactedClasses = findAllImpacted(changedClasses)