use crate::{Client, Rsc}; use openworm::net::NetServerMsg; impl Client { pub fn debug(&mut self, rsc: &mut Rsc) { rsc.ui.debug_layers(); // let mut file = std::fs::OpenOptions::new() // .write(true) // .create(true) // .truncate(true) // .open("./old_msgs") // .unwrap(); // bincode::encode_into_std_write( // self.msgs.clone(), // &mut file, // openworm::net::BINCODE_CONFIG, // ) // .unwrap(); let mut file = std::fs::OpenOptions::new() .read(true) .open("/home/bryan/.local/share/openworm/old_msgs") .unwrap(); let msgs: Vec = bincode::decode_from_std_read(&mut file, openworm::net::BINCODE_CONFIG).unwrap(); for msg in msgs { println!("{msg:?}"); } // client.ui.debug_layers(); } }