From c59ba5623f328feb416960f2ce82bf3fdf4c9a45 Mon Sep 17 00:00:00 2001 From: ykadowak Date: Wed, 8 Nov 2023 01:51:55 +0000 Subject: [PATCH] Simplify function literal --- internal/errors/errors.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/internal/errors/errors.go b/internal/errors/errors.go index 13f7ecbdb1..0e6e5b6b43 100644 --- a/internal/errors/errors.go +++ b/internal/errors/errors.go @@ -288,9 +288,7 @@ func RemoveDuplicates(errs []error) []error { slices.SortStableFunc(errs, func(l error, r error) int { return cmp.Compare(l.Error(), r.Error()) }) - return slices.CompactFunc(errs, func(l error, r error) bool { - return Is(l, r) - }) + return slices.CompactFunc(errs, Is) } type joinError struct {