bytemuck
bytemuck copied to clipboard
convert 2d array to slice without trait bounds
right now you can convert a &[[T; N]; M] into &[T] when T is Pod, but we should add a function for this even for any generic T.
array2_as_slice or something, I dunno
- If there's no bound on
Tat all it doesn't sound like a very good fit for the library. Shouldn'tcorebe able to perform this natively? - Which semantics to choose for
&[[(); 2]; usize::MAX](a valid ZST) which would end up with lengthusize::MAX*2, which overflows.
Shouldn't core be able to perform this natively?
core should be able to do everything in this entire crate natively, but here we are ;3