Open SUPERCILEX opened 1 month ago
Nevermind, I don't think backcompat is possible without implementing a trait for both DerefMut<Target=[u8]>
and DerefMut<Target=[MaybeUninit<u8>]>
which I don't think you can do. Targeting the staging branch instead.
Staging needs a rebase and also https://github.com/bytecodealliance/rustix/issues/1107
Annnnnd I decided to make it backwards compatible again. The public API should be identical except there's now a From
impl for MaybeUninit
. 1.0 should break the ::new
impl to take uninits instead.
Not sure why the tests are so borked.
Ok so the idea with this one is that the ::new
methods would be swapped to use MaybeUninit
s for 1.0 and any way to construct a buffer with [u8]
would be removed. I'm not really happy with the deprecation story as it feels like we'll just be springing this change on people, but I also don't see a way to allow seamless migration while preserving the name new
.
Pretty sure I managed to maintain backcompat via a conversion trait.
Closes #1103