@@ -287,7 +287,7 @@ impl PointTarget {
287287 . cloned ( )
288288 . collect ( ) ,
289289 ) ;
290- ValueTarget :: from_slice ( & hash)
290+ ValueTarget :: from_slice ( & hash. elements )
291291 }
292292}
293293
@@ -412,16 +412,16 @@ impl CircuitBuilderElliptic for CircuitBuilder<GoldilocksField, 2> {
412412 inputs. extend_from_slice ( & p1. u . components ) ;
413413 inputs. extend_from_slice ( & p2. x . components ) ;
414414 inputs. extend_from_slice ( & p2. u . components ) ;
415- let mut outputs = ECAddHomog :: apply ( self , & inputs) ;
415+ let outputs = ECAddHomog :: apply ( self , & inputs) ;
416416 // plonky2 expects all gate constraints to be satisfied by the zero vector.
417417 // So our elliptic curve addition gate computes [x,z-b,u,t-b], and we have to add the b here.
418418 let x = FieldTarget :: new ( outputs[ 0 ..5 ] . try_into ( ) . unwrap ( ) ) ;
419419 let z = FieldTarget :: new ( outputs[ 5 ..10 ] . try_into ( ) . unwrap ( ) ) ;
420420 let u = FieldTarget :: new ( outputs[ 10 ..15 ] . try_into ( ) . unwrap ( ) ) ;
421421 let t = FieldTarget :: new ( outputs[ 15 ..20 ] . try_into ( ) . unwrap ( ) ) ;
422422 let b1 = self . constant ( Point :: B1 ) ;
423- let z = self . nnf_add_scalar_times_generator_power ( b1, 0 , z) ;
424- let t = self . nnf_add_scalar_times_generator_power ( b1, 0 , t) ;
423+ let z = self . nnf_add_scalar_times_generator_power ( b1, 0 , & z) ;
424+ let t = self . nnf_add_scalar_times_generator_power ( b1, 0 , & t) ;
425425 let xq = self . nnf_div ( & x, & z) ;
426426 let uq = self . nnf_div ( & u, & t) ;
427427 PointTarget { x : xq, u : uq }
0 commit comments