From 28f85bdc94edfba9c92a8d892b3080581765335a Mon Sep 17 00:00:00 2001 From: Ruidy Date: Sat, 12 Feb 2022 16:08:46 -0400 Subject: [PATCH] use comparable constraint in contains (#12) Co-authored-by: Ruidy --- 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