Update unsafe.go

This commit is contained in:
Felix Lange 2024-03-04 10:32:35 +01:00 committed by GitHub
parent 7d8d4d27d3
commit 4182d4a289
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,5 +26,5 @@ import (
// byteArrayBytes returns a slice of the byte array v. // byteArrayBytes returns a slice of the byte array v.
func byteArrayBytes(v reflect.Value, length int) []byte { func byteArrayBytes(v reflect.Value, length int) []byte {
return unsafe.Slice((*byte)((unsafe.Pointer)(v.UnsafeAddr())), length) return unsafe.Slice((*byte)(unsafe.Pointer(v.UnsafeAddr())), length)
} }