From 474bcba13eddb1ae2fb2fa6340f1c4064cdcf12f Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 7 Mar 2026 00:38:50 +0800 Subject: *: Use errors.AsType --- reachability/walk_expand_commits_graph.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'reachability/walk_expand_commits_graph.go') diff --git a/reachability/walk_expand_commits_graph.go b/reachability/walk_expand_commits_graph.go index 90e52112..9602f35c 100644 --- a/reachability/walk_expand_commits_graph.go +++ b/reachability/walk_expand_commits_graph.go @@ -11,8 +11,7 @@ import ( func (walk *Walk) expandCommitsFromGraph(id objectid.ObjectID) ([]walkItem, bool, error) { pos, err := walk.reachability.graph.Lookup(id) if err != nil { - var notFound *commitgraphread.NotFoundError - if errors.As(err, ¬Found) { + if _, ok := errors.AsType[*commitgraphread.NotFoundError](err); ok { return nil, false, nil } -- cgit v1.3.1-10-gc9f91