Remove the tedious named return value (#2620)

Co-authored-by: thinkerou <thinkerou@gmail.com>
This commit is contained in:
Andy Pan 2021-02-08 23:24:22 +08:00 committed by GitHub
parent e899771392
commit 1bdf86b722
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,7 +9,7 @@ import (
)
// StringToBytes converts string to byte slice without a memory allocation.
func StringToBytes(s string) (b []byte) {
func StringToBytes(s string) []byte {
return *(*[]byte)(unsafe.Pointer(
&struct {
string