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