Skip to content

Commit

Permalink
chore: remove match statements
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench committed Jan 16, 2024
1 parent 3361a98 commit 52afed8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
7 changes: 1 addition & 6 deletions tooling/nargo/src/ops/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,7 @@ pub fn compile_program(
debug_artifact_path.set_file_name(format!("debug_{}.json", package.name));

let (program, warnings) =
match noirc_driver::compile_main(&mut context, crate_id, compile_options, None) {
Ok(program_and_warnings) => program_and_warnings,
Err(errors) => {
return Err(errors);
}
};
noirc_driver::compile_main(&mut context, crate_id, compile_options, None)?;

// Apply backend specific optimizations.
let optimized_program = crate::ops::optimize_program(program, expression_width);
Expand Down
7 changes: 1 addition & 6 deletions tooling/nargo_cli/src/cli/compile_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,7 @@ fn compile_program(
};

let (program, warnings) =
match noirc_driver::compile_main(&mut context, crate_id, compile_options, cached_program) {
Ok(program_and_warnings) => program_and_warnings,
Err(errors) => {
return Err(errors);
}
};
noirc_driver::compile_main(&mut context, crate_id, compile_options, cached_program)?;

// Apply backend specific optimizations.
let optimized_program = nargo::ops::optimize_program(program, expression_width);
Expand Down

0 comments on commit 52afed8

Please sign in to comment.