Merge pull request #30292 from hashicorp/kmoe/dag-basicedge-hashcode

dags: fix BasicEdge pointer issue
pull/30297/head
kmoe 4 years ago committed by GitHub
commit 73f5c7779f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,9 +1,5 @@
package dag
import (
"fmt"
)
// Edge represents an edge in the graph, with a source and target vertex.
type Edge interface {
Source() Vertex
@ -25,7 +21,7 @@ type basicEdge struct {
}
func (e *basicEdge) Hashcode() interface{} {
return fmt.Sprintf("%p-%p", e.S, e.T)
return [...]interface{}{e.S, e.T}
}
func (e *basicEdge) Source() Vertex {

Loading…
Cancel
Save