Skip to content

Commit 23e3b46

Browse files
committed
napi: replace self occurances to vector in gate_vector
1 parent 50a96dd commit 23e3b46

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

plonk-napi/src/gate_vector.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ macro_rules! impl_gate_support {
163163
vector: &[<Napi $module:camel GateVector>],
164164
index: i32,
165165
) -> [<Napi $module:camel Gate>] {
166-
[<Napi $module:camel Gate>]::from_inner(&self.0[index as usize])
166+
[<Napi $module:camel Gate>]::from_inner(&vector.0[index as usize])
167167
}
168168

169169
#[napi]
@@ -181,15 +181,15 @@ macro_rules! impl_gate_support {
181181
) {
182182
let row = target.row as usize;
183183
let col = target.col as usize;
184-
self.0[row].wires[col] = KimchiWire::from(head);
184+
vector.0[row].wires[col] = KimchiWire::from(head);
185185
}
186186

187187
#[napi]
188188
pub fn [<caml_pasta_ $module:snake _plonk_gate_vector_digest>](
189189
public_input_size: i32,
190190
vector: &[<Napi $module:camel GateVector>],
191191
) -> Vec<u8> {
192-
Circuit::new(public_input_size as usize, &self.0)
192+
Circuit::new(public_input_size as usize, &vector.0)
193193
.digest()
194194
.to_vec()
195195
}
@@ -199,7 +199,7 @@ macro_rules! impl_gate_support {
199199
public_input_size: i32,
200200
vector: &[<Napi $module:camel GateVector>],
201201
) -> Result<String> {
202-
let circuit = Circuit::new(public_input_size as usize, &self.inner);
202+
let circuit = Circuit::new(public_input_size as usize, &vector.0);
203203
serde_json::to_string(&circuit).map_err(|err| {
204204
Error::new(
205205
Status::GenericFailure,

0 commit comments

Comments
 (0)