diff options
| author | Ophestra <cat@gensokyo.uk> | 2026-06-08 14:19:11 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2026-06-08 14:58:24 +0900 |
| commit | f869ff95a12756de97827b4afd93763f9661f144 (patch) | |
| tree | 6f5445ae623f44ceb99c8f7ddb5bb4cd1fb04aa0 /internal/rosa/report.go | |
| parent | 725f2e0ef3eaba1ad46b597604a684125ab93911 (diff) | |
all: apply modernisers
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'internal/rosa/report.go')
| -rw-r--r-- | internal/rosa/report.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/internal/rosa/report.go b/internal/rosa/report.go index 54f60fb3..a97ff8e8 100644 --- a/internal/rosa/report.go +++ b/internal/rosa/report.go @@ -212,11 +212,10 @@ func (r *Report) HandleAccess(errP *error) func() { *errP = err } - var runtimeError interface { + if runtimeError, ok := errors.AsType[interface { Addr() uintptr runtime.Error - } - if errors.As(*errP, &runtimeError) { + }](*errP); ok { offset := int(runtimeError.Addr() - uintptr(unsafe.Pointer(unsafe.SliceData(r.data)))) // best effort for fragile uintptr if offset >= 0 { |
