Simplify code: replace exists with contains (#29729)

This commit is contained in:
yiksanchan 2020-10-12 01:28:21 -07:00 committed by GitHub
parent 1ff619259f
commit 4620c64dc6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -188,7 +188,7 @@ object ORSet {
}
case (ManyVersionVector(lhsVs), ManyVersionVector(rhsVs)) =>
val commonDots = lhsVs.filter {
case (thisDotNode, v) => rhsVs.get(thisDotNode).exists(_ == v)
case (thisDotNode, v) => rhsVs.get(thisDotNode).contains(v)
}
val commonDotsKeys = commonDots.keys
val lhsUniqueDots = lhsVs -- commonDotsKeys