diff --git a/cli/src/main.rs b/cli/src/main.rs index 32802153..bdd51249 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -7,7 +7,11 @@ use std::{fs, io}; mod settings; fn create_or_open_then_write>(path: &Path, content: &T) -> Result<(), io::Error> { - let mut file = fs::OpenOptions::new().create(true).write(true).open(path)?; + let mut file = fs::OpenOptions::new() + .create(true) + .truncate(true) + .write(true) + .open(path)?; file.write_all(content.as_ref()) } diff --git a/frontends/src/circom/mod.rs b/frontends/src/circom/mod.rs index 88a9da5b..313a5602 100644 --- a/frontends/src/circom/mod.rs +++ b/frontends/src/circom/mod.rs @@ -8,8 +8,8 @@ use ark_relations::r1cs::{ConstraintSynthesizer, ConstraintSystemRef, SynthesisE use ark_std::fmt::Debug; use folding_schemes::{frontend::FCircuit, utils::PathOrBin, Error}; use num_bigint::BigInt; +use std::fmt; use std::rc::Rc; -use std::{fmt, usize}; pub mod utils; use utils::CircomWrapper;