3 ms·
>You can put an unsized type at the end of a struct, resulting in an unsized struct. Using a slice as the last member is equivalent to a flexible array member i
by SV_BubbleTime 5y ago
>You can put an unsized type at the end of a struct, resulting in an unsized struct. Using a slice as the last member is equivalent to a flexible array member in C.
News to me! I figured it was inherently a little "unsafe" and Rust's thing in mem safety. Good to know!
>Unfortunately they're barely usable in the current state, since there is no good way to construct such a struct.
Ok, well, now that's just bizarre, but I assume there is a good reason. I'll get on Rust when it's "official" somewhere for embedded. Until then, a strange and mystical shadow in the forest for me.