tvl-depot/users/tazjin/german-string
Vincent Ambo ed4f68b1d3 feat(tazjin/german-string): add constructor method from owned data
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>
2024-08-19 13:19:40 +00:00
..
src feat(tazjin/german-string): add constructor method from owned data 2024-08-19 13:19:40 +00:00
.gitignore feat(tazjin/german-string): init initial representation 2024-08-19 11:42:56 +00:00
Cargo.lock feat(tazjin/german-string): add Eq impl & corresponding proptests 2024-08-19 13:19:40 +00:00
Cargo.toml feat(tazjin/german-string): add Eq impl & corresponding proptests 2024-08-19 13:19:40 +00:00
default.nix chore(tazjin/german-string): add Nix build 2024-08-19 13:19:40 +00:00