diff --git a/phase2/src/circom_circuit.rs b/phase2/src/circom_circuit.rs index b760dfd..cae11fe 100644 --- a/phase2/src/circom_circuit.rs +++ b/phase2/src/circom_circuit.rs @@ -4,7 +4,7 @@ extern crate rand; use std::str; use std::fs; use std::fs::{OpenOptions, File}; -use std::io::{Read, Write}; +use std::io::{Read, Write, BufReader}; use std::collections::BTreeMap; use std::iter::repeat; use std::sync::Arc; @@ -334,7 +334,7 @@ pub fn circuit_from_json_file(filename: &str) -> CircomCircuit:: { .read(true) .open(filename) .expect("unable to open."); - return circuit_from_json(reader); + return circuit_from_json(BufReader::new(reader)); } pub fn circuit_from_json(reader: R) -> CircomCircuit:: {