fix: fix compile error (#255) (#258)

This commit is contained in:
燕归来 authored and GitHub committed 2024-10-18 15:09:28 +08:00
1 parent a254ebdc8e
commit 1008dd4956
2 files changed
+9 -6

No files matched your search

+7
View File
@@ -7,6 +7,13 @@ import (
"golang.org/x/exp/constraints"
)
// resultChunk is used to store the intermediate results of UniqueByConcurrent.
// It is defined separately to be compatible with versions of go up to 1.20.
type resultChunk[T comparable] struct {
index int
data []T
}
// sliceValue return the reflect value of a slice
func sliceValue(slice any) reflect.Value {
v := reflect.ValueOf(slice)