mirror of
https://github.com/sigp/lighthouse.git
synced 2026-04-20 22:38:34 +00:00
Simplify find_head_walk
This commit is contained in:
@@ -1232,11 +1232,7 @@ impl ProtoArray {
|
||||
|
||||
head = children
|
||||
.into_iter()
|
||||
.map(|(child, _)| -> Result<_, Error> {
|
||||
let proto_node = self
|
||||
.nodes
|
||||
.get(child.proto_node_index)
|
||||
.ok_or(Error::InvalidNodeIndex(child.proto_node_index))?;
|
||||
.map(|(child, ref proto_node)| -> Result<_, Error> {
|
||||
let weight = self.get_weight::<E>(
|
||||
&child,
|
||||
proto_node,
|
||||
|
||||
Reference in New Issue
Block a user