Skip to content

Commit

Permalink
Use BufReader for loading R1CS file
Browse files Browse the repository at this point in the history
  • Loading branch information
bruno-valante committed Jun 27, 2024
1 parent 170b10f commit 87b8855
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/circom/builder.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use ark_ec::pairing::Pairing;
use std::{fs::File, path::Path};
use std::{fs::File, io::BufReader, path::Path};

use super::{CircomCircuit, R1CS};

Expand All @@ -26,7 +26,7 @@ pub struct CircomConfig<E: Pairing> {
impl<E: Pairing> CircomConfig<E> {
pub fn new(wtns: impl AsRef<Path>, r1cs: impl AsRef<Path>) -> Result<Self> {
let wtns = WitnessCalculator::new(wtns).unwrap();
let reader = File::open(r1cs)?;
let reader = BufReader::new(File::open(r1cs)?);
let r1cs = R1CSFile::new(reader)?.into();
Ok(Self {
wtns,
Expand Down

0 comments on commit 87b8855

Please sign in to comment.