Skip to content

Put together test_against_stored_vk/proof into test_against_stored_ci… #279

Put together test_against_stored_vk/proof into test_against_stored_ci…

Put together test_against_stored_vk/proof into test_against_stored_ci… #279

GitHub Actions / Clippy (beta) succeeded Jul 2, 2024 in 2s

Clippy (beta)

143 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 143
Note 0
Help 0

Versions

  • rustc 1.80.0-beta.4 (64a1fe671 2024-06-21)
  • cargo 1.80.0-beta.4 (34a6a87d8 2024-06-04)
  • clippy 0.1.80 (64a1fe6 2024-06-21)

Annotations

Check warning on line 407 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

an array of `Range` that is only one element

warning: an array of `Range` that is only one element
   --> halo2_gadgets/src/utilities.rs:407:47
    |
407 |         decompose(pallas::Base::random(rng), &[0..255]);
    |                                               ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_range_in_vec_init
    = note: `-W clippy::single-range-in-vec-init` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::single_range_in_vec_init)]`
help: if you wanted a `Vec` that contains the entire range, try
    |
407 |         decompose(pallas::Base::random(rng), &(0..255).collect::<std::vec::Vec<usize>>());
    |                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
help: if you wanted an array of len 255, try
    |
407 |         decompose(pallas::Base::random(rng), &[0; 255]);
    |                                                ~~~~~~

Check warning on line 127 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:127:34
    |
127 |             _phantom: PhantomData::default(),
    |                                  ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 118 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:118:34
    |
118 |             _phantom: PhantomData::default(),
    |                                  ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 103 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/utilities.rs:103:34
    |
103 |             _phantom: PhantomData::default(),
    |                                  ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 56 in halo2_gadgets/src/utilities/lookup_range_check.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
  --> halo2_gadgets/src/utilities/lookup_range_check.rs:56:38
   |
56 |                 _phantom: PhantomData::default(),
   |                                      ^^^^^^^^^^^ help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 673 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_gadgets/src/sinsemilla.rs:673:48
    |
673 | ...                   .chain(right.into_iter()),
    |                              ^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `right`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/64a1fe67112931359c7c9a222f08fd206255c2b5/library/core/src/iter/traits/iterator.rs:484:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 672 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

explicit call to `.into_iter()` in function argument accepting `IntoIterator`

warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
   --> halo2_gadgets/src/sinsemilla.rs:672:48
    |
672 | ...                   .chain(left.into_iter())
    |                              ^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `left`
    |
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
   --> /rustc/64a1fe67112931359c7c9a222f08fd206255c2b5/library/core/src/iter/traits/iterator.rs:484:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
    = note: `-W clippy::useless-conversion` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::useless_conversion)]`

Check warning on line 206 in halo2_gadgets/src/poseidon.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/poseidon.rs:206:33
    |
206 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 159 in halo2_gadgets/src/poseidon.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/poseidon.rs:159:33
    |
159 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 363 in halo2_gadgets/src/poseidon/primitives.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/poseidon/primitives.rs:363:33
    |
363 |             _domain: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 257 in halo2_gadgets/src/poseidon/primitives.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/poseidon/primitives.rs:257:33
    |
257 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 220 in halo2_gadgets/src/poseidon/primitives.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
   --> halo2_gadgets/src/poseidon/primitives.rs:220:33
    |
220 |             _marker: PhantomData::default(),
    |                                 ^^^^^^^^^^^ help: remove this call to `default`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 88 in halo2_gadgets/src/poseidon/primitives/p128pow5t3.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
  --> halo2_gadgets/src/poseidon/primitives/p128pow5t3.rs:88:38
   |
88 |             P128Pow5T3Gen(PhantomData::default())
   |                                      ^^^^^^^^^^^ help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs

Check warning on line 72 in halo2_gadgets/src/poseidon/primitives/grain.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

use of `default` to create a unit struct

warning: use of `default` to create a unit struct
  --> halo2_gadgets/src/poseidon/primitives/grain.rs:72:32
   |
72 |             _field: PhantomData::default(),
   |                                ^^^^^^^^^^^ help: remove this call to `default`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#default_constructed_unit_structs
   = note: `-W clippy::default-constructed-unit-structs` implied by `-W clippy::all`
   = help: to override `-W clippy::all` add `#[allow(clippy::default_constructed_unit_structs)]`

Check warning on line 517 in halo2_gadgets/src/poseidon/pow5.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/poseidon/pow5.rs:517:77
    |
517 |                 let r_0 = (p[0] + config.round_constants[round + 1][0]).pow(&config.alpha);
    |                                                                             ^^^^^^^^^^^^^ help: change this to: `config.alpha`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 477 in halo2_gadgets/src/poseidon/pow5.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/poseidon/pow5.rs:477:73
    |
477 |                 let r_0 = (p[0] + config.round_constants[round][0]).pow(&config.alpha);
    |                                                                         ^^^^^^^^^^^^^ help: change this to: `config.alpha`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 451 in halo2_gadgets/src/poseidon/pow5.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/poseidon/pow5.rs:451:62
    |
451 |             let r: Value<Vec<F>> = q.map(|q| q.map(|q| q.pow(&config.alpha))).collect();
    |                                                              ^^^^^^^^^^^^^ help: change this to: `config.alpha`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 265 in halo2_gadgets/src/poseidon/pow5.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> halo2_gadgets/src/poseidon/pow5.rs:256:58
    |
256 |                   let state = (0..config.half_full_rounds).fold(Ok(state), |res, r| {
    |  __________________________________________________________^
257 | |                     res.and_then(|state| {
258 | |                         state.full_round(
259 | |                             &mut region,
...   |
264 | |                     })
265 | |                 })?;
    | |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check warning on line 254 in halo2_gadgets/src/poseidon/pow5.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> halo2_gadgets/src/poseidon/pow5.rs:245:61
    |
245 |                   let state = (0..config.half_partial_rounds).fold(Ok(state), |res, r| {
    |  _____________________________________________________________^
246 | |                     res.and_then(|state| {
247 | |                         state.partial_round(
248 | |                             &mut region,
...   |
253 | |                     })
254 | |                 })?;
    | |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold

Check warning on line 243 in halo2_gadgets/src/poseidon/pow5.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

usage of `Iterator::fold` on a type that implements `Try`

warning: usage of `Iterator::fold` on a type that implements `Try`
   --> halo2_gadgets/src/poseidon/pow5.rs:241:58
    |
241 |                   let state = (0..config.half_full_rounds).fold(Ok(state), |res, r| {
    |  __________________________________________________________^
242 | |                     res.and_then(|state| state.full_round(&mut region, config, r, r))
243 | |                 })?;
    | |__________________^ help: use `try_fold` instead: `try_fold(state, |res, r| ...)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_try_fold
    = note: `-W clippy::manual-try-fold` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::manual_try_fold)]`

Check warning on line 395 in halo2_gadgets/src/ecc/chip/mul_fixed.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/ecc/chip/mul_fixed.rs:395:42
    |
395 |             .map(|k| k * (*H_SCALAR).pow(&[(NUM_WINDOWS - 1) as u64, 0, 0, 0]) - offset_acc);
    |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[(NUM_WINDOWS - 1) as u64, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 390 in halo2_gadgets/src/ecc/chip/mul_fixed.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/ecc/chip/mul_fixed.rs:390:37
    |
390 |             acc + (*TWO_SCALAR).pow(&[FIXED_BASE_WINDOW_SIZE as u64 * w as u64 + 1, 0, 0, 0])
    |                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[FIXED_BASE_WINDOW_SIZE as u64 * w as u64 + 1, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 373 in halo2_gadgets/src/ecc/chip/mul_fixed.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/ecc/chip/mul_fixed.rs:373:68
    |
373 |         let scalar = k.map(|k| (k + *TWO_SCALAR) * (*H_SCALAR).pow(&[w as u64, 0, 0, 0]));
    |                                                                    ^^^^^^^^^^^^^^^^^^^^ help: change this to: `[w as u64, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check warning on line 127 in halo2_gadgets/benches/poseidon.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/benches/poseidon.rs:127:25
    |
127 |         val.pow_vartime(&[5])
    |                         ^^^^ help: change this to: `[5]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
    = note: `-W clippy::needless-borrows-for-generic-args` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::needless_borrows_for_generic_args)]`

Check warning on line 220 in halo2_gadgets/src/ecc/chip/constants.rs

See this annotation in the file changed.

@github-actions github-actions / Clippy (beta)

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
   --> halo2_gadgets/src/ecc/chip/constants.rs:220:45
    |
220 |             * C::Scalar::from(H as u64).pow(&[(num_windows - 1) as u64, 0, 0, 0])
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[(num_windows - 1) as u64, 0, 0, 0]`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args