mirror of https://github.com/goccy/go-json.git
optimize unnecessary copy
This commit is contained in:
parent
aef2390074
commit
a75b5e9d93
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue