Clippy fixes

This commit is contained in:
therealyingtong 2021-04-26 08:53:43 +08:00
parent 03da010d6a
commit 7524c95547
2 changed files with 6 additions and 5 deletions

View File

@ -537,10 +537,10 @@ impl<F: FieldExt> FieldChip<F> {
});
let mut add_chip = AddChip::new();
let add_config = add_chip.configure(meta, advice.clone(), perm.clone());
let add_config = add_chip.configure(meta, advice, perm.clone());
let mut mul_chip = MulChip::new();
let mul_config = mul_chip.configure(meta, advice.clone(), perm.clone());
let mul_config = mul_chip.configure(meta, advice, perm.clone());
let config = FieldConfigEnum::Config(FieldConfig {
advice,
@ -677,6 +677,7 @@ impl<F: FieldExt> Circuit<F> for MyCircuit<F> {
}
// ANCHOR_END: circuit
#[allow(clippy::many_single_char_names)]
fn main() {
use halo2::{dev::MockProver, pasta::Fp};

View File

@ -31,8 +31,8 @@ impl Loaded for () {
/// [`Chip::Config`], which can be fetched via [`Chip::config`].
///
/// The chip also loads any fixed configuration needed at synthesis time
/// using [`Chip::load`], and stores it in [`Chip::Loaded`]. This can be
/// accessed via [`Chip::loaded`].
/// using its own implementation of `load`, and stores it in [`Chip::Loaded`].
/// This can be accessed via [`Chip::loaded`].
pub trait Chip<F: FieldExt>: Sized {
/// A type that holds the configuration for this chip, and any other state it may need
/// during circuit synthesis, that can be derived during [`Circuit::configure`].
@ -211,7 +211,7 @@ pub trait Layouter<F: FieldExt> {
///
/// ```ignore
/// fn assign_region(&mut self, || "region name", |region| {
/// let config = chip.config().clone();
/// let config = chip.config();
/// region.assign_advice(config.a, offset, || { Some(value)});
/// });
/// ```