From 11694f065dcf742786578a4c62c5dd710f952306 Mon Sep 17 00:00:00 2001 From: Yik San Chan Date: Thu, 17 Sep 2020 18:39:42 -0700 Subject: [PATCH] Replace to with toSet --- akka-cluster/src/main/scala/akka/cluster/Reachability.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/akka-cluster/src/main/scala/akka/cluster/Reachability.scala b/akka-cluster/src/main/scala/akka/cluster/Reachability.scala index f36f46aeff..10a08dd2f8 100644 --- a/akka-cluster/src/main/scala/akka/cluster/Reachability.scala +++ b/akka-cluster/src/main/scala/akka/cluster/Reachability.scala @@ -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)