mirror of https://github.com/zcash/halo2.git
clippy: Fix capitalized acronyms in tests and examples
This commit is contained in:
parent
305ca89bab
commit
e262941b70
|
@ -22,7 +22,7 @@ fn bench_with_k(name: &str, k: u32, c: &mut Criterion) {
|
|||
let params: Params<EqAffine> = Params::new(k);
|
||||
|
||||
#[derive(Clone)]
|
||||
struct PLONKConfig {
|
||||
struct PlonkConfig {
|
||||
a: Column<Advice>,
|
||||
b: Column<Advice>,
|
||||
c: Column<Advice>,
|
||||
|
@ -35,7 +35,7 @@ fn bench_with_k(name: &str, k: u32, c: &mut Criterion) {
|
|||
perm: Permutation,
|
||||
}
|
||||
|
||||
trait StandardCS<FF: FieldExt> {
|
||||
trait StandardCs<FF: FieldExt> {
|
||||
fn raw_multiply<F>(
|
||||
&self,
|
||||
layouter: &mut impl Layouter<FF>,
|
||||
|
@ -59,21 +59,21 @@ fn bench_with_k(name: &str, k: u32, c: &mut Criterion) {
|
|||
k: u32,
|
||||
}
|
||||
|
||||
struct StandardPLONK<F: FieldExt> {
|
||||
config: PLONKConfig,
|
||||
struct StandardPlonk<F: FieldExt> {
|
||||
config: PlonkConfig,
|
||||
_marker: PhantomData<F>,
|
||||
}
|
||||
|
||||
impl<FF: FieldExt> StandardPLONK<FF> {
|
||||
fn new(config: PLONKConfig) -> Self {
|
||||
StandardPLONK {
|
||||
impl<FF: FieldExt> StandardPlonk<FF> {
|
||||
fn new(config: PlonkConfig) -> Self {
|
||||
StandardPlonk {
|
||||
config,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<FF: FieldExt> StandardCS<FF> for StandardPLONK<FF> {
|
||||
impl<FF: FieldExt> StandardCs<FF> for StandardPlonk<FF> {
|
||||
fn raw_multiply<F>(
|
||||
&self,
|
||||
layouter: &mut impl Layouter<FF>,
|
||||
|
@ -172,14 +172,14 @@ fn bench_with_k(name: &str, k: u32, c: &mut Criterion) {
|
|||
}
|
||||
|
||||
impl<F: FieldExt> Circuit<F> for MyCircuit<F> {
|
||||
type Config = PLONKConfig;
|
||||
type Config = PlonkConfig;
|
||||
type FloorPlanner = SimpleFloorPlanner;
|
||||
|
||||
fn without_witnesses(&self) -> Self {
|
||||
Self { a: None, k: self.k }
|
||||
}
|
||||
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PLONKConfig {
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PlonkConfig {
|
||||
let a = meta.advice_column();
|
||||
let b = meta.advice_column();
|
||||
let c = meta.advice_column();
|
||||
|
@ -204,7 +204,7 @@ fn bench_with_k(name: &str, k: u32, c: &mut Criterion) {
|
|||
vec![a.clone() * sa + b.clone() * sb + a * b * sm + (c * sc * (-F::one()))]
|
||||
});
|
||||
|
||||
PLONKConfig {
|
||||
PlonkConfig {
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
|
@ -218,10 +218,10 @@ fn bench_with_k(name: &str, k: u32, c: &mut Criterion) {
|
|||
|
||||
fn synthesize(
|
||||
&self,
|
||||
config: PLONKConfig,
|
||||
config: PlonkConfig,
|
||||
mut layouter: impl Layouter<F>,
|
||||
) -> Result<(), Error> {
|
||||
let cs = StandardPLONK::new(config);
|
||||
let cs = StandardPlonk::new(config);
|
||||
|
||||
for _ in 0..(1 << (self.k - 1)) {
|
||||
let mut a_squared = None;
|
||||
|
|
|
@ -16,7 +16,7 @@ fn main() {
|
|||
pub struct Variable(Column<Advice>, usize);
|
||||
|
||||
#[derive(Clone)]
|
||||
struct PLONKConfig {
|
||||
struct PlonkConfig {
|
||||
a: Column<Advice>,
|
||||
b: Column<Advice>,
|
||||
c: Column<Advice>,
|
||||
|
@ -35,7 +35,7 @@ fn main() {
|
|||
perm2: Permutation,
|
||||
}
|
||||
|
||||
trait StandardCS<FF: FieldExt> {
|
||||
trait StandardCs<FF: FieldExt> {
|
||||
fn raw_multiply<F>(
|
||||
&self,
|
||||
region: &mut Region<FF>,
|
||||
|
@ -62,21 +62,21 @@ fn main() {
|
|||
lookup_tables: Vec<Vec<F>>,
|
||||
}
|
||||
|
||||
struct StandardPLONK<F: FieldExt> {
|
||||
config: PLONKConfig,
|
||||
struct StandardPlonk<F: FieldExt> {
|
||||
config: PlonkConfig,
|
||||
_marker: PhantomData<F>,
|
||||
}
|
||||
|
||||
impl<FF: FieldExt> StandardPLONK<FF> {
|
||||
fn new(config: PLONKConfig) -> Self {
|
||||
StandardPLONK {
|
||||
impl<FF: FieldExt> StandardPlonk<FF> {
|
||||
fn new(config: PlonkConfig) -> Self {
|
||||
StandardPlonk {
|
||||
config,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<FF: FieldExt> StandardCS<FF> for StandardPLONK<FF> {
|
||||
impl<FF: FieldExt> StandardCs<FF> for StandardPlonk<FF> {
|
||||
fn raw_multiply<F>(
|
||||
&self,
|
||||
region: &mut Region<FF>,
|
||||
|
@ -221,7 +221,7 @@ fn main() {
|
|||
}
|
||||
|
||||
impl<F: FieldExt> Circuit<F> for MyCircuit<F> {
|
||||
type Config = PLONKConfig;
|
||||
type Config = PlonkConfig;
|
||||
type FloorPlanner = SimpleFloorPlanner;
|
||||
|
||||
fn without_witnesses(&self) -> Self {
|
||||
|
@ -231,7 +231,7 @@ fn main() {
|
|||
}
|
||||
}
|
||||
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PLONKConfig {
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PlonkConfig {
|
||||
let e = meta.advice_column();
|
||||
let a = meta.advice_column();
|
||||
let b = meta.advice_column();
|
||||
|
@ -309,7 +309,7 @@ fn main() {
|
|||
vec![sp * (a + p * (-F::one()))]
|
||||
});
|
||||
|
||||
PLONKConfig {
|
||||
PlonkConfig {
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
|
@ -329,10 +329,10 @@ fn main() {
|
|||
|
||||
fn synthesize(
|
||||
&self,
|
||||
config: PLONKConfig,
|
||||
config: PlonkConfig,
|
||||
mut layouter: impl Layouter<F>,
|
||||
) -> Result<(), Error> {
|
||||
let cs = StandardPLONK::new(config);
|
||||
let cs = StandardPlonk::new(config);
|
||||
|
||||
let _ = cs.public_input(&mut layouter.namespace(|| "input"), || {
|
||||
Ok(F::one() + F::one())
|
||||
|
|
|
@ -29,7 +29,7 @@ fn plonk_api() {
|
|||
let params: Params<EqAffine> = Params::new(K);
|
||||
|
||||
#[derive(Clone)]
|
||||
struct PLONKConfig {
|
||||
struct PlonkConfig {
|
||||
a: Column<Advice>,
|
||||
b: Column<Advice>,
|
||||
c: Column<Advice>,
|
||||
|
@ -48,7 +48,7 @@ fn plonk_api() {
|
|||
perm2: Permutation,
|
||||
}
|
||||
|
||||
trait StandardCS<FF: FieldExt> {
|
||||
trait StandardCs<FF: FieldExt> {
|
||||
fn raw_multiply<F>(
|
||||
&self,
|
||||
layouter: &mut impl Layouter<FF>,
|
||||
|
@ -80,21 +80,21 @@ fn plonk_api() {
|
|||
lookup_tables: Vec<Vec<F>>,
|
||||
}
|
||||
|
||||
struct StandardPLONK<F: FieldExt> {
|
||||
config: PLONKConfig,
|
||||
struct StandardPlonk<F: FieldExt> {
|
||||
config: PlonkConfig,
|
||||
_marker: PhantomData<F>,
|
||||
}
|
||||
|
||||
impl<FF: FieldExt> StandardPLONK<FF> {
|
||||
fn new(config: PLONKConfig) -> Self {
|
||||
StandardPLONK {
|
||||
impl<FF: FieldExt> StandardPlonk<FF> {
|
||||
fn new(config: PlonkConfig) -> Self {
|
||||
StandardPlonk {
|
||||
config,
|
||||
_marker: PhantomData,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<FF: FieldExt> StandardCS<FF> for StandardPLONK<FF> {
|
||||
impl<FF: FieldExt> StandardCs<FF> for StandardPlonk<FF> {
|
||||
fn raw_multiply<F>(
|
||||
&self,
|
||||
layouter: &mut impl Layouter<FF>,
|
||||
|
@ -263,7 +263,7 @@ fn plonk_api() {
|
|||
}
|
||||
|
||||
impl<F: FieldExt> Circuit<F> for MyCircuit<F> {
|
||||
type Config = PLONKConfig;
|
||||
type Config = PlonkConfig;
|
||||
type FloorPlanner = SimpleFloorPlanner;
|
||||
|
||||
fn without_witnesses(&self) -> Self {
|
||||
|
@ -273,7 +273,7 @@ fn plonk_api() {
|
|||
}
|
||||
}
|
||||
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PLONKConfig {
|
||||
fn configure(meta: &mut ConstraintSystem<F>) -> PlonkConfig {
|
||||
let e = meta.advice_column();
|
||||
let a = meta.advice_column();
|
||||
let b = meta.advice_column();
|
||||
|
@ -351,7 +351,7 @@ fn plonk_api() {
|
|||
vec![sp * (a + p * (-F::one()))]
|
||||
});
|
||||
|
||||
PLONKConfig {
|
||||
PlonkConfig {
|
||||
a,
|
||||
b,
|
||||
c,
|
||||
|
@ -371,10 +371,10 @@ fn plonk_api() {
|
|||
|
||||
fn synthesize(
|
||||
&self,
|
||||
config: PLONKConfig,
|
||||
config: PlonkConfig,
|
||||
mut layouter: impl Layouter<F>,
|
||||
) -> Result<(), Error> {
|
||||
let cs = StandardPLONK::new(config);
|
||||
let cs = StandardPlonk::new(config);
|
||||
|
||||
let _ = cs.public_input(&mut layouter, || Ok(F::one() + F::one()))?;
|
||||
|
||||
|
|
Loading…
Reference in New Issue