mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Lint: Fix violations of S1009: should omit nil check; len() for nil slices is defined as zero (#14973)
* Fix violations of S1009: should omit nil check; len() for nil slices is defined as zero * Changelog fragment
This commit is contained in:
@@ -354,7 +354,7 @@ func IsInSlots(a primitives.Slot, b []primitives.Slot) bool {
|
||||
|
||||
// Unique returns an array with duplicates filtered based on the type given
|
||||
func Unique[T comparable](a []T) []T {
|
||||
if a == nil || len(a) <= 1 {
|
||||
if len(a) <= 1 {
|
||||
return a
|
||||
}
|
||||
found := map[T]bool{}
|
||||
|
||||
Reference in New Issue
Block a user