From 96a901f76998b992cb40f2c4bad49a08793f33c3 Mon Sep 17 00:00:00 2001 From: PL Pery Date: Wed, 3 Dec 2025 10:45:50 +0100 Subject: [PATCH] slices: indirect and references should be any not comparable --- slices/ptr.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slices/ptr.go b/slices/ptr.go index 4f3ba0c..a8e04e4 100644 --- a/slices/ptr.go +++ b/slices/ptr.go @@ -4,7 +4,7 @@ package slices // References returns slice with the value of the slice in params as // pointers. -func References[T comparable](s []T) []*T { +func References[T any](s []T) []*T { var r = make([]*T, len(s)) for i, v := range s { @@ -15,7 +15,7 @@ func References[T comparable](s []T) []*T { return r } -func Indirect[T comparable](s []*T) []T { +func Indirect[T any](s []*T) []T { var r = make([]T, len(s)) for i, v := range s {