diff options
author | Vincent Ambo <tazjin@tvl.su> | 2024-08-19T12·03+0300 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2024-08-19T13·19+0000 |
commit | ed4f68b1d335359000a71be8ba999d221965aff8 (patch) | |
tree | 036c33b52488bf4dbc19f9a15a9c080b622fffd2 /ops | |
parent | 0d6d31bc66928252f2ea9d53fc7a5e13d4893c92 (diff) |
feat(tazjin/german-string): add constructor method from owned data r/8535
Makes it possible to construct a GermanString from an owned byte vector, without having to clone the data. This is done by "disowning" the vector using ManuallyDrop to access its internal pointer. For transient strings, this memory is then owned (and freed) by the GermanString instance. Small strings are copied out of the heap and stored inline as before, to avoid any dereferencing operations. Change-Id: I754736099f71d646d430aed73e558a5a7626c394 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12249 Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'ops')
0 files changed, 0 insertions, 0 deletions