Rename argument to a eligible one

This commit is contained in:
Andy Pan 2020-01-15 17:49:32 +08:00
parent 351cc7308d
commit 8d60c278e6

View File

@ -14,6 +14,6 @@ func StringToBytes(s string) (b []byte) {
}
// BytesToString converts byte slice to string without a memory allocation.
func BytesToString(s []byte) string {
return *(*string)(unsafe.Pointer(&s))
func BytesToString(b []byte) string {
return *(*string)(unsafe.Pointer(&b))
}