@@ -247,7 +247,7 @@ fn g2_frobenius_map_affine<C: CircuitContext>(
247247 let y_f2 = Fq2 :: frobenius_montgomery ( circuit, & y1, 1 ) ;
248248 let x2 = Fq2 :: mul_by_constant_montgomery ( circuit, & x_f2, & Fq2 :: as_montgomery ( cx) ) ;
249249 let mut y2 = Fq2 :: mul_by_constant_montgomery ( circuit, & y_f2, & Fq2 :: as_montgomery ( cy) ) ;
250- y2 = Fq2 :: neg ( circuit, y2) ;
250+ y2 = Fq2 :: neg ( circuit, & y2) ;
251251 G2Projective {
252252 x : x2,
253253 y : y2,
@@ -285,7 +285,7 @@ fn g2_line_coeffs_double<C: CircuitContext>(
285285 let one_c0 = Fq :: new_constant ( & Fq :: as_montgomery ( ark_bn254:: Fq :: ONE ) ) . expect ( "const one" ) ;
286286 let zero_c1 = Fq :: new_constant ( & Fq :: as_montgomery ( ark_bn254:: Fq :: ZERO ) ) . expect ( "const zero" ) ;
287287 let c0 = Fq2 :: from_components ( one_c0, zero_c1) ;
288- let c1 = Fq2 :: neg ( circuit, lambda. clone ( ) ) ;
288+ let c1 = Fq2 :: neg ( circuit, & lambda) ;
289289 let lambda_x = Fq2 :: mul_montgomery ( circuit, & lambda, & x) ;
290290 let c2 = Fq2 :: sub ( circuit, & lambda_x, & y) ;
291291
@@ -323,7 +323,7 @@ fn g2_line_coeffs_add<C: CircuitContext>(
323323 let one_c0 = Fq :: new_constant ( & Fq :: as_montgomery ( ark_bn254:: Fq :: ONE ) ) . expect ( "const one" ) ;
324324 let zero_c1 = Fq :: new_constant ( & Fq :: as_montgomery ( ark_bn254:: Fq :: ZERO ) ) . expect ( "const zero" ) ;
325325 let c0 = Fq2 :: from_components ( one_c0, zero_c1) ;
326- let c1 = Fq2 :: neg ( circuit, lambda. clone ( ) ) ;
326+ let c1 = Fq2 :: neg ( circuit, & lambda) ;
327327 let lambda_xr = Fq2 :: mul_montgomery ( circuit, & lambda, & xr) ;
328328 let c2 = Fq2 :: sub ( circuit, & lambda_xr, & yr) ;
329329
@@ -394,7 +394,7 @@ pub fn double_in_place_circuit_montgomery<C: CircuitContext>(
394394 let gs = Fq2 :: square_montgomery ( circuit, & g) ;
395395 let new_y = Fq2 :: sub ( circuit, & gs, & es_triple) ;
396396 let new_z = Fq2 :: mul_montgomery ( circuit, & b, & h) ;
397- let hn = Fq2 :: neg ( circuit, h) ;
397+ let hn = Fq2 :: neg ( circuit, & h) ;
398398
399399 (
400400 G2Projective {
@@ -438,7 +438,7 @@ pub fn add_in_place_montgomery(
438438 let wires_4 = Fq2 :: double ( circuit, & g) ;
439439 let h = Fq2 :: sub ( circuit, & wires_3, & wires_4) ;
440440
441- let neg_theta = Fq2 :: neg ( circuit, theta. clone ( ) ) ;
441+ let neg_theta = Fq2 :: neg ( circuit, & theta) ;
442442
443443 let wires_5 = Fq2 :: mul_montgomery ( circuit, & theta, qx) ;
444444 let wires_6 = Fq2 :: mul_montgomery ( circuit, & lambda, qy) ;
@@ -468,7 +468,7 @@ pub fn g2_affine_neg_evaluate<C: CircuitContext>(
468468 q : & G2Projective ,
469469) -> G2Projective {
470470 let mut result = q. clone ( ) ;
471- result. y = Fq2 :: neg ( circuit, q. y . clone ( ) ) ;
471+ result. y = Fq2 :: neg ( circuit, & q. y ) ;
472472 result
473473}
474474
0 commit comments