From 653aa63cacc94cff57e3194b8ae78a93a05c07b3 Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sat, 12 Feb 2022 15:57:33 -0400 Subject: [PATCH] use comparable constraint in contains --- contains.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contains.go b/contains.go index 55cd559..7f81ff1 100644 --- a/contains.go +++ b/contains.go @@ -1,9 +1,7 @@ package underscore -import "constraints" - // Contains returns true if the value is present in the slice -func Contains[T constraints.Ordered](values []T, value T) bool { +func Contains[T comparable](values []T, value T) bool { for _, v := range values { if v == value { return true