From 14bec5a998699048e74254b68712e6b7d574c935 Mon Sep 17 00:00:00 2001 From: Xinding Wei Date: Sat, 9 Sep 2023 21:51:07 -0400 Subject: [PATCH] [chore] Fix fmt (#144) Fix fmt --- halo2-base/src/gates/tests/flex_gate.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/halo2-base/src/gates/tests/flex_gate.rs b/halo2-base/src/gates/tests/flex_gate.rs index f3cb7aad..53cf9513 100644 --- a/halo2-base/src/gates/tests/flex_gate.rs +++ b/halo2-base/src/gates/tests/flex_gate.rs @@ -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; @@ -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,b: Vec>, -) -> (Fr, Vec) { +pub fn test_inner_product_left(a: Vec, b: Vec>) -> (Fr, Vec) { 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())