diff --git a/src/slices/slices.go b/src/slices/slices.go index 857ab46314324b..b3cd4e2c054001 100644 --- a/src/slices/slices.go +++ b/src/slices/slices.go @@ -15,6 +15,7 @@ import ( // elements equal. If the lengths are different, Equal returns false. // Otherwise, the elements are compared in increasing index order, and the // comparison stops at the first unequal pair. +// Empty and nil slices are considered equal. // Floating point NaNs are not considered equal. func Equal[S ~[]E, E comparable](s1, s2 S) bool { if len(s1) != len(s2) {