Skip to content

Commit

Permalink
[chore] Fix fmt (#144)
Browse files Browse the repository at this point in the history
Fix fmt
  • Loading branch information
nyunyunyunyu authored Sep 10, 2023
1 parent 54044c9 commit 14bec5a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions halo2-base/src/gates/tests/flex_gate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use super::*;
use crate::utils::biguint_to_fe;
use crate::utils::testing::base_test;
use crate::QuantumCell::{Witness,Constant};
use crate::QuantumCell::{Constant, Witness};
use crate::{gates::flex_gate::GateInstructions, QuantumCell};
use itertools::Itertools;
use num_bigint::BigUint;
Expand Down Expand Up @@ -99,13 +99,11 @@ pub fn test_inner_product_left_last(
})
}

#[test_case([4,5,6].map(Fr::from).to_vec(), [1,2,3].map(|x| Constant(Fr::from(x))).to_vec() => (Fr::from(32), [4,5,6].map(Fr::from).to_vec());
#[test_case([4,5,6].map(Fr::from).to_vec(), [1,2,3].map(|x| Constant(Fr::from(x))).to_vec() => (Fr::from(32), [4,5,6].map(Fr::from).to_vec());
"inner_product_left(): <[1,2,3],[4,5,6]> Constant b starts with 1")]
#[test_case([1,2,3].map(Fr::from).to_vec(), [4,5,6].map(|x| Witness(Fr::from(x))).to_vec() => (Fr::from(32), [1,2,3].map(Fr::from).to_vec());
#[test_case([1,2,3].map(Fr::from).to_vec(), [4,5,6].map(|x| Witness(Fr::from(x))).to_vec() => (Fr::from(32), [1,2,3].map(Fr::from).to_vec());
"inner_product_left(): <[1,2,3],[4,5,6]> Witness")]
pub fn test_inner_product_left(
a: Vec<Fr>,b: Vec<QuantumCell<Fr>>,
) -> (Fr, Vec<Fr>) {
pub fn test_inner_product_left(a: Vec<Fr>, b: Vec<QuantumCell<Fr>>) -> (Fr, Vec<Fr>) {
base_test().run_gate(|ctx, chip| {
let (prod, a) = chip.inner_product_left(ctx, a.into_iter().map(Witness), b);
(*prod.value(), a.iter().map(|v| *v.value()).collect())
Expand Down

0 comments on commit 14bec5a

Please sign in to comment.