aboutsummaryrefslogtreecommitdiff
path: root/src/strings/clone.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings/clone.go')
-rw-r--r--src/strings/clone.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/strings/clone.go b/src/strings/clone.go
index edd1497d9e..d14df11d49 100644
--- a/src/strings/clone.go
+++ b/src/strings/clone.go
@@ -24,5 +24,5 @@ func Clone(s string) string {
}
b := make([]byte, len(s))
copy(b, s)
- return *(*string)(unsafe.Pointer(&b))
+ return unsafe.String(&b[0], len(b))
}