uuid
uuid copied to clipboard
feat: avoid copying in TryFrom<Vec<u8>>
Closes #733
Hi @pjenvey :wave:
For what it's worth it looks like these generate roughly equivalent code, but the existing implementation is slightly better: https://godbolt.org/z/138rGesMz
We end up creating a copy of the bytes anyway since uuid takes ownership of them. Did you observe some surprising behavior attempting to use these TryFrom conversions?
Thanks for the PR @pjenvey. I couldn't find a compelling reason to change this; they seemed to generate the same code, so will close this one to keep the source a bit simpler.
If you do notice any real-world impact here please feel free to re-open.