slices: fix Equal contract

slices.Equal only requires comparable, not Ordered.

Change-Id: I0150f1370e478aaa33bbd8788a1f9c9d33b85e06
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go2-dev/+/716483
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Jonathan Amsterdam 2020-04-12 10:42:05 -04:00 committed by Robert Griesemer
parent 63d4750592
commit 7a57f4d76e
1 changed files with 1 additions and 1 deletions

View File

@ -13,7 +13,7 @@ import (
// Equal reports whether two slices are equal: the same length and all
// elements equal. All floating point NaNs are considered equal.
func Equal(type Elem contracts.Ordered)(s1, s2 []Elem) bool {
func Equal(type Elem comparable)(s1, s2 []Elem) bool {
if len(s1) != len(s2) {
return false
}