From 0ff1d420f21101a92d8da888d491860cf0cf16cc Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 5 Feb 2023 10:03:08 -0700 Subject: containers: s/Cmp/Compare/ to match the standard library Go 1.18 added net/netip.Addr.Compare, and Go 1.20 added time.Time.Compare. --- lib/containers/set.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/containers/set.go') diff --git a/lib/containers/set.go b/lib/containers/set.go index b2af494..0d9202c 100644 --- a/lib/containers/set.go +++ b/lib/containers/set.go @@ -32,7 +32,7 @@ func (o Set[T]) EncodeJSON(w io.Writer) error { var zero T switch (any(zero)).(type) { case _Ordered[T]: - less = func(a, b T) bool { return cast[_Ordered[T]](a).Cmp(b) < 0 } + less = func(a, b T) bool { return cast[_Ordered[T]](a).Compare(b) < 0 } // This is the constraints.Ordered list case string: less = func(a, b T) bool { return cast[string](a) < cast[string](b) } -- cgit v1.2.3-2-g168b