These are chat archives for rust-lang/rust
Vec<u8>? I have a scenario where a binary blob is copied from a file into a
Vec<u8>and later needs to be re-interpreted as either a
&[u32], or trivially, a
&[u8]. The final data type isn't known at compile time. I know in C that
malloc()is suitably aligned for any type, but this is Rust. Would it be better idea to handle the allocation and alignment explicitly using alloc::heap::allocate instead?
alloc::heap::allocateif you can (e.g. can use nightly).
transmuteit into Vec<u8>.