"I'd expect this to work, but..." <- > <@jsizeland:matrix.org> I'd expect this to work, but it errors on the Vec being empty > ```rust > #![no_std] > > #[cfg(test)] > mod tests { > > use heapless::Vec; > use bincode::{config, Decode, Encode}; > > #[derive(Encode, Decode, PartialEq, Debug)] > struct Entity { > x: u32, > y: u32, > } > > #[test] > fn encode_bytes() { > let config = config::standard(); > let mut dst: Vec = Default::default(); > let val = Entity { x: 1, y: 2 }; > > bincode::encode_into_slice(val, &mut dst, config).unwrap(); > assert_eq!(dst.len(), 8); > } > } > ``` `bincode::serialize_into()` would use `Write` to directly serialize into a heapless `Vec`, but that trait is not available in `no_std`, right?