Merge pull request #29619 from YikSanChan/fix/replace-to-with-toSet
Replace to with toSet
This commit is contained in:
commit
1b026ec3d9
1 changed files with 1 additions and 1 deletions
|
|
@ -195,7 +195,7 @@ private[cluster] class Reachability private (
|
|||
}
|
||||
|
||||
def remove(nodes: Iterable[UniqueAddress]): Reachability = {
|
||||
val nodesSet = nodes.to(immutable.HashSet)
|
||||
val nodesSet: Set[UniqueAddress] = nodes.toSet
|
||||
val newRecords = records.filterNot(r => nodesSet(r.observer) || nodesSet(r.subject))
|
||||
val newVersions = versions -- nodes
|
||||
Reachability(newRecords, newVersions)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue