Name pathWalk's modes, and draw a path only through drawPath once it is proved
This commit is contained in:
@@ -165,10 +165,7 @@ func renderEdges(n node) []renderEdge {
|
||||
// already proved the tail resolves in every variant.
|
||||
func pathLeaves(n node, tail []string) []node {
|
||||
var out []node
|
||||
_, _ = walkPath(n, tail, pathWalk{
|
||||
choice: func(c *choice, _ []string) ([]node, error) { return c.items, nil },
|
||||
leaf: func(n node) error { out = append(out, n); return nil },
|
||||
})
|
||||
_, _ = walkPath(n, tail, pathWalk{mode: walkEvery, pins: &pinSet{}, leaf: func(n node) error { out = append(out, n); return nil }})
|
||||
return out
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user