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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
*(*string)(p) = string(bytes)
|
*(*string)(p) = *(*string)(unsafe.Pointer(&bytes))
|
||||||
s.reset()
|
s.reset()
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue