separated out utilities and started tightening visibility modifiers
This commit is contained in:
parent
9f2b349029
commit
0946d13e6e
6 changed files with 150 additions and 203 deletions
21
src/main.rs
21
src/main.rs
|
@ -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(())
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue