File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ pub use fp2::ScalarExt2;
88use rand:: { CryptoRng , RngCore } ;
99use serde:: Serialize ;
1010use std:: fmt;
11+ use std:: ops:: { AddAssign , MulAssign , SubAssign } ;
1112use std:: {
1213 cmp:: Eq ,
1314 hash:: Hash ,
@@ -35,8 +36,14 @@ pub trait SpartanExtensionField:
3536 + Neg
3637 + Default
3738 + Add < Output = Self >
39+ + AddAssign
40+ + for < ' a > AddAssign < & ' a Self >
3841 + Sub < Output = Self >
42+ + SubAssign
43+ + for < ' a > SubAssign < & ' a Self >
3944 + Mul < Output = Self >
45+ + MulAssign
46+ + for < ' a > MulAssign < & ' a Self >
4047 + Sum
4148 + Product
4249 + Clone
Original file line number Diff line number Diff line change @@ -71,8 +71,8 @@ impl<Scalar: SpartanExtensionField> UniPoly<Scalar> {
7171 let mut eval = self . coeffs [ 0 ] ;
7272 let mut power = * r;
7373 for i in 1 ..self . coeffs . len ( ) {
74- eval = eval + power * self . coeffs [ i] ;
75- power = power * * r;
74+ eval += power * self . coeffs [ i] ;
75+ power *= r;
7676 }
7777 eval
7878 }
You can’t perform that action at this time.
0 commit comments