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

dags: fix BasicEdge pointer issue
This commit is contained in:
kmoe 2022-01-05 16:49:31 +00:00 committed by GitHub
commit 73f5c7779f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 5 deletions

View File

@ -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 {