separated out utilities and started tightening visibility modifiers

This commit is contained in:
Yehowshua Immanuel 2022-08-08 19:45:14 -04:00
parent 9f2b349029
commit 0946d13e6e
6 changed files with 150 additions and 203 deletions

View file

@ -1,18 +1,17 @@
use std::{fs::File};
use clap::Parser;
use std::fs::File;
pub mod test;
pub mod vcd;
use vcd::parse_vcd;
use std::mem::size_of_val;
#[derive(Parser)]
struct Cli {
/// The path to the file to read
#[clap(parse(from_os_str))]
path: std::path::PathBuf}
path: std::path::PathBuf,
}
fn main() -> std::io::Result<()> {
let args = Cli::parse();
@ -21,19 +20,9 @@ fn main() -> std::io::Result<()> {
let now = Instant::now();
let file = File::open(&args.path)?;
let vcd = parse_vcd(file).unwrap();
parse_vcd(file).unwrap();
let elapsed = now.elapsed();
println!("Elapsed: {:.2?}", elapsed);
vcd.print_longest_signal();
dbg!(size_of_val(&*vcd.timeline));
// unsafe {
// let sz = size_of_val(&*vcd.timeline);
// }
// println!("printing signal tree");
// vcd.print_scopes();
Ok(())
}
}