unsafeToString casts a byte slice to a string w/o allocating
(b []byte)
| 2921 | |
| 2922 | // unsafeToString casts a byte slice to a string w/o allocating |
| 2923 | func unsafeToString(b []byte) string { |
| 2924 | if len(b) == 0 { |
| 2925 | return "" |
| 2926 | } |
| 2927 | return unsafe.String(unsafe.SliceData(b), len(b)) |
| 2928 | } |
no test coverage detected