optimize unnecessary copy

This commit is contained in:
Masaaki Goshima 2021-02-06 17:41:51 +09:00
parent aef2390074
commit a75b5e9d93
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ func (d *stringDecoder) decodeStream(s *stream, p unsafe.Pointer) error {
if err != nil {
return err
}
*(*string)(p) = string(bytes)
*(*string)(p) = *(*string)(unsafe.Pointer(&bytes))
s.reset()
return nil
}