Skip to content

Commit

Permalink
Simplify function literal
Browse files Browse the repository at this point in the history
  • Loading branch information
ykadowak committed Nov 8, 2023
1 parent 4876809 commit c59ba56
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions internal/errors/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c59ba56

Please sign in to comment.