"perhaps an easy question, anyone..." <- > <@takkaryx:matrix.org> perhaps an easy question, anyone familiar with using heapless vec's and converting them to a u8 arrays to transmit over wire? > > I'm attempting to use micropb crate, and I have a general protobuf packet getting built into a stream, but when I try to generate the u8 array to hand to a usb driver, it hangs my processor > > code is basically this: > > ``` > let mut stream = Vec::::new(); > loop { > let mut encoder = PbEncoder::new(&mut stream); > let telem = construct_telem(); //Returns proto struct. > telem.encode_len_delimited(&mut encoder).unwrap(); > info!("making buffer"); > let buf: [u8; 64] = stream.clone().into_array().unwrap(); // this line hangs the processor. > info!("wrote buffer! {:?}", &buf); > class.write_packet(&buf).await?; //Class is USB ACM class driver. > ticker.next().await; > } > ``` does it hang on the first iteration of the loop?