Skip to content

Commit

Permalink
Use UnreachableError in panic
Browse files Browse the repository at this point in the history
Co-authored-by: Bastian Müller <bastian@turbolent.com>
  • Loading branch information
fxamacker and turbolent authored Oct 19, 2023
1 parent ca1a9ea commit af06ef7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/cmd/decode-state-values/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ var _ atree.SlabStorage = &slabStorage{}

func (s *slabStorage) RetrieveIfLoaded(atree.SlabID) atree.Slab {
// RetrieveIfLoaded() is used for loaded resource tracking. So it isn't needed here.
panic("not reachable")
panic(errors.NewUnreachableError())

Check failure on line 141 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Performance regression check

undefined: errors.NewUnreachableError

Check failure on line 141 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: errors.NewUnreachableError

Check failure on line 141 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: errors.NewUnreachableError

Check failure on line 141 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Test

undefined: errors.NewUnreachableError
}

Check failure on line 142 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Performance regression check

missing return

Check failure on line 142 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Lint

missing return (typecheck)

Check failure on line 142 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Lint

missing return (typecheck)

Check failure on line 142 in runtime/cmd/decode-state-values/main.go

View workflow job for this annotation

GitHub Actions / Test

missing return

func (s *slabStorage) Retrieve(id atree.SlabID) (atree.Slab, bool, error) {
Expand Down

0 comments on commit af06ef7

Please sign in to comment.