From 03faf5daedea79a9eb391ccc23be57c22fba2f68 Mon Sep 17 00:00:00 2001 From: Vladimir Mihailenco Date: Wed, 26 Aug 2015 09:38:44 +0300 Subject: [PATCH] Disable unsafe. --- unsafe.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) 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) }