From f869ff95a12756de97827b4afd93763f9661f144 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 8 Jun 2026 14:19:11 +0900 Subject: all: apply modernisers Signed-off-by: Ophestra --- internal/stub/errors.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'internal/stub/errors.go') diff --git a/internal/stub/errors.go b/internal/stub/errors.go index c89149be..560bde6e 100644 --- a/internal/stub/errors.go +++ b/internal/stub/errors.go @@ -20,9 +20,6 @@ func (e UniqueError) Error() string { } func (e UniqueError) Is(target error) bool { - var u UniqueError - if !errors.As(target, &u) { - return false - } - return e == u + u, ok := errors.AsType[UniqueError](target) + return ok && e == u } -- cgit v1.3.1