Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
mrwormhole committed Sep 18, 2023
1 parent 668b243 commit 7780022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cmp/cmpopts/equate.go
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ func compareErrors(x, y any) bool {
// safe for direct == comparison. For example, [net/netip.Addr] is documented
// as being semantically safe to use with ==, while [time.Time] is documented
// to discourage the use of == on time values.
func EquateComparable(typs ...interface{}) cmp.Option {
func EquateComparable(typs ...any) cmp.Option {
types := make(typesFilter)
for _, typ := range typs {
switch t := reflect.TypeOf(typ); {
Expand All @@ -182,4 +182,4 @@ type typesFilter map[reflect.Type]bool

func (tf typesFilter) filter(p cmp.Path) bool { return tf[p.Last().Type()] }

func equateAny(x, y interface{}) bool { return x == y }
func equateAny(x, y any) bool { return x == y }
2 changes: 1 addition & 1 deletion cmp/internal/value/name.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func appendTypeName(b []byte, t reflect.Type, qualified, elideFunc bool) []byte
// of the same name and within the same package,
// but declared within the namespace of different functions.

// Use the "any" alias instead of "any" for better readability.
// Use the "any" alias instead of "interface{}" for better readability.
if t == anyType {
return append(b, "any"...)
}
Expand Down

0 comments on commit 7780022

Please sign in to comment.