chore: clean utils's SliceContains (#24149)

This commit is contained in:
lido333 2025-03-27 01:58:48 +08:00 committed by GitHub
parent 16f1b61de5
commit a8e44c6a80
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -80,15 +80,3 @@ func BigEndianToUint64(bz []byte) uint64 {
return binary.BigEndian.Uint64(bz)
}
// SliceContains implements a generic function for checking if a slice contains
// a certain value.
func SliceContains[T comparable](elements []T, v T) bool {
for _, s := range elements {
if v == s {
return true
}
}
return false
}