Skip to content

Commit

Permalink
Allow clippy::many_single_char_names
Browse files Browse the repository at this point in the history
It's math, it happens.
  • Loading branch information
str4d committed Sep 2, 2021
1 parent e6b2fd8 commit 355ebe2
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/domain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ fn best_fft<S: PrimeField, T: Group<S>>(a: &mut [T], worker: &Worker, omega: &S,
}
}

#[allow(clippy::many_single_char_names)]
fn serial_fft<S: PrimeField, T: Group<S>>(a: &mut [T], omega: &S, log_n: u32) {
fn bitreverse(mut n: u32, l: u32) -> u32 {
let mut r = 0;
Expand Down
2 changes: 2 additions & 0 deletions src/gadgets/blake2s.rs
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ const SIGMA: [[usize; 16]; 10] = [
END FUNCTION.
*/

#[allow(clippy::many_single_char_names)]
fn mixing_g<Scalar: PrimeField, CS: ConstraintSystem<Scalar>, M>(
mut cs: M,
v: &mut [UInt32],
Expand Down Expand Up @@ -164,6 +165,7 @@ where
END FUNCTION.
*/

#[allow(clippy::many_single_char_names)]
fn blake2s_compression<Scalar: PrimeField, CS: ConstraintSystem<Scalar>>(
mut cs: CS,
h: &mut [UInt32],
Expand Down
1 change: 1 addition & 0 deletions src/gadgets/sha256.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ fn get_sha256_iv() -> Vec<UInt32> {
IV.iter().map(|&v| UInt32::constant(v)).collect()
}

#[allow(clippy::many_single_char_names)]
fn sha256_compression_function<Scalar, CS>(
cs: CS,
input: &[Boolean],
Expand Down
1 change: 1 addition & 0 deletions src/gadgets/uint32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ mod test {
}

#[test]
#[allow(clippy::many_single_char_names)]
fn test_uint32_addmany() {
let mut rng = XorShiftRng::from_seed([
0x59, 0x62, 0xbe, 0x5d, 0x76, 0x3d, 0x31, 0x8d, 0x17, 0xdb, 0x37, 0x32, 0x54, 0x06,
Expand Down
1 change: 1 addition & 0 deletions src/groth16/prover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ where
create_proof::<E, C, P>(circuit, params, r, s)
}

#[allow(clippy::many_single_char_names)]
pub fn create_proof<E, C, P: ParameterSource<E>>(
circuit: C,
mut params: P,
Expand Down
1 change: 1 addition & 0 deletions src/groth16/tests/dummy_engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@ impl Field for Fr {
}
}

#[allow(clippy::many_single_char_names)]
fn sqrt(&self) -> CtOption<Self> {
// Tonelli-Shank's algorithm for q mod 16 = 1
// https://eprint.iacr.org/2012/685.pdf (page 12, algorithm 5)
Expand Down

0 comments on commit 355ebe2

Please sign in to comment.