浏览代码

clippy on the tests

Ian Goldberg 1 月之前
父节点
当前提交
7be6ffc378
共有 2 个文件被更改,包括 13 次插入13 次删除
  1. 9 9
      sigma_compiler_core/src/pedersen.rs
  2. 4 4
      sigma_compiler_core/src/sigma/combiners.rs

+ 9 - 9
sigma_compiler_core/src/pedersen.rs

@@ -1752,7 +1752,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = x*A + r*B },
             parse_quote! { x },
             quote! { let out = C; },
@@ -1761,7 +1761,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = x*A + r*B },
             parse_quote! { 2 * x },
             quote! { let out = Scalar::from_u128(2u128) * C; },
@@ -1770,7 +1770,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = x*A + r*B },
             parse_quote! { 2 * x + 12 },
             quote! { let out = (Scalar::from_u128(2u128) * C) +
@@ -1780,7 +1780,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = x*A + r*B },
             parse_quote! { 2 * x + 12 + a },
             quote! { let out = (Scalar::from_u128(2u128) * C) +
@@ -1790,7 +1790,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = 3*x*A + r*B },
             parse_quote! { 2 * x + 12 + a },
             quote! { let out = (Scalar::from_u128(2u128) *
@@ -1802,7 +1802,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = -3*x*A + r*B },
             parse_quote! { 2 * x + 12 + a },
             quote! { let out = (Scalar::from_u128(2u128) *
@@ -1814,7 +1814,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = (-3*x+4+b)*A + r*B },
             parse_quote! { 2 * x + 12 + a },
             quote! { let out = (Scalar::from_u128(2u128) *
@@ -1827,7 +1827,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = (-3*x+4+b)*A + 2*r*B },
             parse_quote! { 2 * x + 12 + a },
             quote! { let out = (Scalar::from_u128(2u128) *
@@ -1841,7 +1841,7 @@ mod test {
 
         convert_commitment_randomness_tester(
             vars,
-            &randoms,
+            randoms,
             parse_quote! { C = (-3*x+4+b)*A + (2*r+c-3)*B },
             parse_quote! { 2 * x + 12 + a },
             quote! { let out = (Scalar::from_u128(2u128) *

+ 4 - 4
sigma_compiler_core/src/sigma/combiners.rs

@@ -846,7 +846,7 @@ mod test {
         let mut output: Vec<(Vec<usize>, StatementTree)> = Vec::new();
         let expected_st: Vec<(Vec<usize>, StatementTree)> = expected
             .iter()
-            .map(|(path, ex)| (path.clone(), StatementTree::parse(&ex).unwrap()))
+            .map(|(path, ex)| (path.clone(), StatementTree::parse(ex).unwrap()))
             .collect();
         let mut st = StatementTree::parse(&e).unwrap();
         st.for_each_disjunction_branch(&mut |db, path| {
@@ -861,7 +861,7 @@ mod test {
         let mut output: Vec<(Vec<usize>, StatementTree)> = Vec::new();
         let expected_st: Vec<(Vec<usize>, StatementTree)> = expected
             .iter()
-            .map(|(path, ex)| (path.clone(), StatementTree::parse(&ex).unwrap()))
+            .map(|(path, ex)| (path.clone(), StatementTree::parse(ex).unwrap()))
             .collect();
         let mut st = StatementTree::parse(&e).unwrap();
         st.for_each_disjunction_branch(&mut |st, path| {
@@ -1197,7 +1197,7 @@ mod test {
                 (
                     path.clone(),
                     vex.iter()
-                        .map(|ex| StatementTree::parse(&ex).unwrap())
+                        .map(|ex| StatementTree::parse(ex).unwrap())
                         .collect(),
                 )
             })
@@ -1225,7 +1225,7 @@ mod test {
                 (
                     path.clone(),
                     vex.iter()
-                        .map(|ex| StatementTree::parse(&ex).unwrap())
+                        .map(|ex| StatementTree::parse(ex).unwrap())
                         .collect(),
                 )
             })