aboutsummaryrefslogtreecommitdiffhomepage
path: root/internal/stub/errors.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/stub/errors.go')
-rw-r--r--internal/stub/errors.go7
1 files changed, 2 insertions, 5 deletions
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
}