mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-04-28 03:00:18 -04:00
zk: use reference instead of cloning
This commit is contained in:
@@ -34,13 +34,13 @@ impl ZkCircuit {
|
||||
fn new(circuit_code: &PyCell<ZkBinary>) -> Self {
|
||||
let circuit_code = circuit_code.borrow().deref().0.clone();
|
||||
// DUMMY CIRCUIT
|
||||
let circuit = vm::ZkCircuit::new(vec![], circuit_code);
|
||||
let circuit = vm::ZkCircuit::new(vec![], &circuit_code);
|
||||
Self(circuit, vec![])
|
||||
}
|
||||
|
||||
fn build(&self, circuit_code: &PyCell<ZkBinary>) -> Self {
|
||||
let circuit_code = circuit_code.borrow().deref().0.clone();
|
||||
let circuit = vm::ZkCircuit::new(self.1.clone(), circuit_code);
|
||||
let circuit = vm::ZkCircuit::new(self.1.clone(), &circuit_code);
|
||||
Self(circuit, self.1.clone())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user