Skip to content

Commit

Permalink
Run 'cargo fmt' after constraint-evaluation-generator
Browse files Browse the repository at this point in the history
The cargo pre-commit hook will notice that the auto-generated code
hasn't been formatted. Even though it's never committed, the pre-commit
hook triggers.
sshine committed Nov 16, 2022
1 parent 1326b12 commit 2d183e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions constraint-evaluation-generator/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use std::collections::HashSet;
use std::process::Command;

use itertools::Itertools;
use triton_vm::table::challenges::TableChallenges;
@@ -46,6 +47,10 @@ fn main() {
let mut circuits = ExtJumpStackTable::ext_transition_constraints_as_circuits();
let source_code = gen("jump_stack_table", "JumpStackTable", &mut circuits);
write("jump_stack_table", source_code);

if let Err(fmt_failed) = Command::new("cargo").arg("fmt").output() {
println!("cargo fmt failed: {}", fmt_failed);
}
}

fn write(table_name_snake: &str, rust_source_code: String) {

0 comments on commit 2d183e4

Please sign in to comment.