diff --git a/link_test.go b/link_test.go deleted file mode 100644 index b8a407a..0000000 --- a/link_test.go +++ /dev/null @@ -1 +0,0 @@ -package incr diff --git a/list_util.go b/list_util.go index c5ac573..f4d51b9 100644 --- a/list_util.go +++ b/list_util.go @@ -9,17 +9,3 @@ func remove[A INode](nodes []A, id Identifier) []A { } return output } - -func hasKey[A INode](nodes []A, id Identifier) bool { - for _, n := range nodes { - if n.Node().id == id { - return true - } - } - return false -} - -func mapHasKey[K comparable, V any](m map[K]V, k K) (ok bool) { - _, ok = m[k] - return -} diff --git a/main_test.go b/main_test.go index 55ab6bf..810c11e 100644 --- a/main_test.go +++ b/main_test.go @@ -249,3 +249,17 @@ func dumpDot(g *Graph, path string) error { } return nil } + +func hasKey[A INode](nodes []A, id Identifier) bool { + for _, n := range nodes { + if n.Node().id == id { + return true + } + } + return false +} + +func mapHasKey[K comparable, V any](m map[K]V, k K) (ok bool) { + _, ok = m[k] + return +}