From 2e4dcc6b67c8040b7b8a0369b59040818356280c Mon Sep 17 00:00:00 2001 From: Magamedrasul Ibragimov Date: Thu, 6 Jun 2024 14:08:03 +0300 Subject: [PATCH] chore: create dir after checks --- src/main.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index ffa84d1..c9f24de 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,14 +20,13 @@ fn main() -> Result<(), ProgramError> { let args = Args::parse(); - let output_dir = args.output.clone(); + let circuit = build_circuit(&args)?; + let report = circuit.generate_circuit_report()?; + let output_dir = args.output.clone(); fs::create_dir_all(output_dir.clone()) .map_err(|_| ProgramError::OutputDirectoryCreationError)?; - let circuit = build_circuit(&args)?; - let report = circuit.generate_circuit_report()?; - let output_file_path = build_output( &output_dir, args.input.file_stem().unwrap().to_str().unwrap(),