Skip to content

Commit a962c24

Browse files
committed
fix: allow(non_snake_case) for functions using EC notation.
1 parent 5d25651 commit a962c24

File tree

3 files changed

+12
-0
lines changed

3 files changed

+12
-0
lines changed

tests/relations/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ pub fn bbs_blind_commitment<G: PrimeGroup, R: RngCore>(
321321
}
322322

323323
/// LinearMap for the user's specific relation: A * 1 + gen__disj1_x_r * B
324+
#[allow(non_snake_case)]
324325
pub fn weird_linear_combination<G: PrimeGroup, R: RngCore>(
325326
rng: &mut R,
326327
) -> (CanonicalLinearRelation<G>, Vec<G::Scalar>) {
@@ -349,6 +350,7 @@ pub fn weird_linear_combination<G: PrimeGroup, R: RngCore>(
349350
(instance, witness)
350351
}
351352

353+
#[allow(non_snake_case)]
352354
pub fn simple_subtractions<G: PrimeGroup, R: RngCore>(
353355
mut rng: &mut R,
354356
) -> (CanonicalLinearRelation<G>, Vec<G::Scalar>) {
@@ -368,6 +370,7 @@ pub fn simple_subtractions<G: PrimeGroup, R: RngCore>(
368370
(instance, witness)
369371
}
370372

373+
#[allow(non_snake_case)]
371374
pub fn subtractions_with_shift<G: PrimeGroup, R: RngCore>(
372375
rng: &mut R,
373376
) -> (CanonicalLinearRelation<G>, Vec<G::Scalar>) {
@@ -433,6 +436,7 @@ pub fn cmz_wallet_spend_relation<G: PrimeGroup, R: RngCore>(
433436
(instance, witness)
434437
}
435438

439+
#[allow(non_snake_case)]
436440
pub fn nested_affine_relation<G: PrimeGroup, R: RngCore>(
437441
mut rng: &mut R,
438442
) -> (CanonicalLinearRelation<G>, Vec<G::Scalar>) {
@@ -457,6 +461,7 @@ pub fn nested_affine_relation<G: PrimeGroup, R: RngCore>(
457461
(instance, witness)
458462
}
459463

464+
#[allow(non_snake_case)]
460465
pub fn pedersen_commitment_equality<G: PrimeGroup, R: RngCore>(
461466
rng: &mut R,
462467
) -> (CanonicalLinearRelation<G>, Vec<G::Scalar>) {
@@ -480,6 +485,7 @@ pub fn pedersen_commitment_equality<G: PrimeGroup, R: RngCore>(
480485
(instance.canonical().unwrap(), witness)
481486
}
482487

488+
#[allow(non_snake_case)]
483489
pub fn elgamal_subtraction<G: PrimeGroup, R: RngCore>(
484490
rng: &mut R,
485491
) -> (CanonicalLinearRelation<G>, Vec<G::Scalar>) {

tests/test_relations.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ mod relations;
88
use relations::*;
99

1010
#[test]
11+
#[allow(non_snake_case)]
1112
fn test_cmz_wallet_with_fee() {
1213
use group::Group;
1314
type G = bls12_381::G1Projective;

tests/test_validation_criteria.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ mod instance_validation {
3232
}
3333

3434
#[test]
35+
#[allow(non_snake_case)]
3536
fn test_zero_image() {
3637
// Create a linear relation with zero elements in the image
3738
// 0 = x * G (which is invalid)
@@ -108,6 +109,7 @@ mod instance_validation {
108109
}
109110

110111
#[test]
112+
#[allow(non_snake_case)]
111113
fn test_empty_string() {
112114
let rng = &mut rand::thread_rng();
113115
let relation = LinearRelation::<G>::new();
@@ -123,6 +125,7 @@ mod instance_validation {
123125
}
124126

125127
#[test]
128+
#[allow(non_snake_case)]
126129
fn test_statement_without_witness() {
127130
let pub_scalar = Scalar::from(42);
128131
let A = G::generator();
@@ -185,6 +188,7 @@ mod instance_validation {
185188
}
186189

187190
#[test]
191+
#[allow(non_snake_case)]
188192
fn test_statement_with_trivial_image() {
189193
let mut rng = rand::thread_rng();
190194
let mut linear_relation = LinearRelation::new();
@@ -385,6 +389,7 @@ mod proof_validation {
385389
}
386390

387391
#[test]
392+
#[allow(non_snake_case)]
388393
fn test_or_relation() {
389394
// This test reproduces the issue from sigma_compiler's simple_or test
390395
// where an OR relation fails verification when using the wrong branch

0 commit comments

Comments
 (0)