Skip to content

Commit

Permalink
drop unused nilToZero
Browse files Browse the repository at this point in the history
  • Loading branch information
lmittmann committed Feb 6, 2025
1 parent fac3be2 commit d24dd2f
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions w3vm/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ func Slot3(pos, key0, key1, key2 common.Hash) common.Hash {
)
}

// nilToZero converts sets a pointer to the zero value if it is nil.
func nilToZero[T any](ptr *T) *T {
if ptr == nil {
return new(T)
}
return ptr
}

// zeroHashFunc implements a [vm.GetHashFunc] that always returns the zero hash.
func zeroHashFunc(uint64) common.Hash {
return w3.Hash0
Expand Down

0 comments on commit d24dd2f

Please sign in to comment.