Closed alufers closed 3 months ago
This prevents panics on debug builds in new rust nightly versions (as of 2024-03-27), since they added bounds checks to get_unchecked_mut, which here was called on a zero-length slice representing a flexible array member. See: https://github.com/rust-lang/rust/commit/2b43e75c98cc5ae32328c8b49657bcd882eb5e75
get_unchecked_mut
TBH I am still learning rust, so if there is any better way of doing this let me know and I will change it.
Looks good to me
Merged. Thanks.
This prevents panics on debug builds in new rust nightly versions (as of 2024-03-27), since they added bounds checks to
get_unchecked_mut
, which here was called on a zero-length slice representing a flexible array member. See: https://github.com/rust-lang/rust/commit/2b43e75c98cc5ae32328c8b49657bcd882eb5e75TBH I am still learning rust, so if there is any better way of doing this let me know and I will change it.