1
0
Fork 0

diplomacy: eliminate redundant bindings

This commit is contained in:
Wesley W. Terpstra 2017-11-20 17:20:54 -08:00
parent baa31edf7d
commit 44f99cd9a5
1 changed files with 1 additions and 1 deletions

View File

@ -256,7 +256,7 @@ trait BindingScope
eval
val map: Map[Device, ResourceBindings] =
resourceBindings.reverse.groupBy(_._1.owner).mapValues(seq => ResourceBindings(
seq.groupBy(_._1.key).mapValues(_.map(z => Binding(z._2, z._3)))))
seq.groupBy(_._1.key).mapValues(_.map(z => Binding(z._2, z._3)).distinct)))
val tree = makeTree(map.toList.flatMap { case (d, m) =>
val Description(name, mapping) = d.describe(m)
val tokens = name.split("/").toList