Use withDefaultValue instead of withDefault
* Just minor boy scouting cleanup
This commit is contained in:
parent
413680e305
commit
545becacfe
2 changed files with 2 additions and 2 deletions
|
|
@ -202,7 +202,7 @@ private[akka] class ClusterRouteeProvider(
|
|||
} else {
|
||||
// find the node with least routees
|
||||
val numberOfRouteesPerNode: Map[Address, Int] =
|
||||
currentRoutees.foldLeft(currentNodes.map(_ -> 0).toMap.withDefault(_ ⇒ 0)) { (acc, x) ⇒
|
||||
currentRoutees.foldLeft(currentNodes.map(_ -> 0).toMap.withDefaultValue(0)) { (acc, x) ⇒
|
||||
val address = fullAddress(x)
|
||||
acc + (address -> (acc(address) + 1))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue