diff --git a/unsafe.go b/unsafe.go index 3cd8d1c..75465d4 100644 --- a/unsafe.go +++ b/unsafe.go @@ -2,13 +2,6 @@ package redis -import ( - "reflect" - "unsafe" -) - func bytesToString(b []byte) string { - bytesHeader := (*reflect.SliceHeader)(unsafe.Pointer(&b)) - strHeader := reflect.StringHeader{bytesHeader.Data, bytesHeader.Len} - return *(*string)(unsafe.Pointer(&strHeader)) + return string(b) }