From 6e20e48489b0d00f4ecc60bdc42f5c1645895237 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 12 Jun 2018 04:31:31 -0400 Subject: [PATCH] lang: Simplify graph function for edge half in parser --- lang/structs.go | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/lang/structs.go b/lang/structs.go index c9d2d4c1..1f09401a 100644 --- a/lang/structs.go +++ b/lang/structs.go @@ -969,18 +969,7 @@ func (obj *StmtEdgeHalf) Unify() ([]interfaces.Invariant, error) { // no outgoing edges have produced at least a single value, then the resources // know they're able to be built. func (obj *StmtEdgeHalf) Graph() (*pgraph.Graph, error) { - graph, err := pgraph.NewGraph("edgehalf") - if err != nil { - return nil, errwrap.Wrapf(err, "could not create graph") - } - - g, err := obj.Name.Graph() - if err != nil { - return nil, err - } - graph.AddGraph(g) - - return graph, nil + return obj.Name.Graph() } // StmtIf represents an if condition that contains between one and two branches