use crate::Log; #[derive(clap::Args, Debug, Clone)] #[command(author, version, about, long_about = None)] pub struct PrintRes { #[arg(long)] pub db: std::path::PathBuf, } impl PrintRes { pub fn run(&self) { let db = sled::open(&self.db).unwrap(); for entry in db.iter() { let (difficulty, entry) = entry.unwrap(); let log: Log = bincode::deserialize::(&entry[..]).unwrap(); let difficulty: u32 = bincode::deserialize::(&difficulty).unwrap(); println!("{difficulty}: {}", log.time); } } }