mirror of https://github.com/go-redis/redis.git
Merge pull request #157 from go-redis/fix/disable-unsafe
Disable unsafe.
This commit is contained in:
commit
152c38c687
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue