This commit is contained in:
Kovid Goyal 2023-02-03 08:02:28 +05:30
parent a8480a4ca6
commit 7ea4270c88
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -21,6 +21,5 @@ func UnsafeStringToBytes(s string) (b []byte) {
// If you modify b, then s will also be modified. This violates the
// property that strings are immutable.
func UnsafeBytesToString(b []byte) (s string) {
unsafe.String(unsafe.SliceData(b), len(b))
return s
return unsafe.String(unsafe.SliceData(b), len(b))
}