pgraph: Fix ineffassign warning
This ineffassign didn't seem to cause problems, but perhaps we didn't exhaustively test all the areas. Watch out to make sure this doesn't break any of the sync requirements, eg: "A WaitGroup must not be copied after first use." https://golang.org/pkg/sync/#WaitGroup
This commit is contained in:
@@ -279,7 +279,7 @@ func (g *Graph) VertexMerge(v1, v2 *Vertex, vertexMergeFn func(*Vertex, *Vertex)
|
|||||||
if v, err := vertexMergeFn(v1, v2); err != nil {
|
if v, err := vertexMergeFn(v1, v2); err != nil {
|
||||||
return err
|
return err
|
||||||
} else if v != nil { // replace v1 with the "merged" version...
|
} else if v != nil { // replace v1 with the "merged" version...
|
||||||
v1 = v // XXX: will this replace v1 the way we want?
|
*v1 = *v // TODO: is this safe? (replacing mutexes is undefined!)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
g.DeleteVertex(v2) // remove grouped vertex
|
g.DeleteVertex(v2) // remove grouped vertex
|
||||||
|
|||||||
Reference in New Issue
Block a user