diff options
Diffstat (limited to 'ancestor/unit_test.go')
| -rw-r--r-- | ancestor/unit_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ancestor/unit_test.go b/ancestor/unit_test.go index 827aeb8f..b6ca7b58 100644 --- a/ancestor/unit_test.go +++ b/ancestor/unit_test.go @@ -110,8 +110,7 @@ func TestIsRejectsNonCommitAfterPeel(t *testing.T) { t.Fatal("expected error") } - var typeErr *giterrors.ObjectTypeError - if !errors.As(err, &typeErr) { + if _, ok := errors.AsType[*giterrors.ObjectTypeError](err); !ok { t.Fatalf("expected ObjectTypeError, got %T (%v)", err, err) } }) |
