refactor #46
Clippy (beta)
74 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 74 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.70.0 (90c541806 2023-05-31)
- cargo 1.70.0 (ec8a8a0ca 2023-04-25)
- clippy 0.1.70 (90c5418 2023-05-31)
Annotations
Check warning on line 325 in halo2_proofs/src/protostar/constraints/expression.rs
github-actions / Clippy (beta)
redundant closure
warning: redundant closure
--> halo2_proofs/src/protostar/constraints/expression.rs:325:18
|
325 | &mut |constant| Expression::Constant(constant),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Expression::Constant`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `-W clippy::redundant-closure` implied by `-W clippy::all`
Check warning on line 404 in halo2_proofs/src/protostar/keygen.rs
github-actions / Clippy (beta)
function `extract_common_simple_selector` is never used
warning: function `extract_common_simple_selector` is never used
--> halo2_proofs/src/protostar/keygen.rs:404:8
|
404 | pub fn extract_common_simple_selector<F: Field>(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 46 in halo2_proofs/src/protostar/keygen.rs
github-actions / Clippy (beta)
field `permutation_pk` is never read
warning: field `permutation_pk` is never read
--> halo2_proofs/src/protostar/keygen.rs:46:16
|
25 | pub struct ProvingKey<C: CurveAffine> {
| ---------- field in this struct
...
46 | pub(crate) permutation_pk: permutation::ProvingKey<C>,
| ^^^^^^^^^^^^^^
|
= note: `ProvingKey` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
Check warning on line 38 in halo2_proofs/src/protostar/constraints/expression.rs
github-actions / Clippy (beta)
method `traverse` is never used
warning: method `traverse` is never used
--> halo2_proofs/src/protostar/constraints/expression.rs:38:12
|
23 | impl<F, CV, FV, WV> Expression<F, CV, FV, WV> {
| --------------------------------------------- method in this implementation
...
38 | pub fn traverse(&self, f: &mut impl FnMut(&Self)) {
| ^^^^^^^^
Check warning on line 28 in halo2_proofs/src/protostar/constraints.rs
github-actions / Clippy (beta)
field `num_rows` is never read
warning: field `num_rows` is never read
--> halo2_proofs/src/protostar/constraints.rs:28:5
|
19 | pub struct Data<T: QueryType> {
| ---- field in this struct
...
28 | num_rows: usize,
| ^^^^^^^^
Check warning on line 91 in halo2_proofs/src/protostar/accumulator/committed.rs
github-actions / Clippy (beta)
function `batch_commit_transparent` is never used
warning: function `batch_commit_transparent` is never used
--> halo2_proofs/src/protostar/accumulator/committed.rs:91:8
|
91 | pub fn batch_commit_transparent<
| ^^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 91 in halo2_proofs/src/poly.rs
github-actions / Clippy (beta)
function `lagrange_from_vec` is never used
warning: function `lagrange_from_vec` is never used
--> halo2_proofs/src/poly.rs:91:15
|
91 | pub(crate) fn lagrange_from_vec<F: ff::Field>(values: Vec<F>) -> Polynomial<F, LagrangeCoeff> {
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 122 in halo2_proofs/src/protostar/accumulator.rs
github-actions / Clippy (beta)
unused variable: `error`
warning: unused variable: `error`
--> halo2_proofs/src/protostar/accumulator.rs:122:13
|
122 | let error = error_vec
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_error`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 200 in halo2_gadgets/src/sinsemilla.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_gadgets/src/sinsemilla.rs:200:30
|
200 | assert!(num_words <= piece_max_num_words as usize);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `piece_max_num_words`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 30 in halo2_proofs/benches/commit_zk.rs
github-actions / Clippy (beta)
useless conversion to the same type: `std::ops::Range<usize>`
warning: useless conversion to the same type: `std::ops::Range<usize>`
--> halo2_proofs/benches/commit_zk.rs:29:46
|
29 | let mut thread_seeds: Vec<ChaCha20Rng> = (0..n_chunks)
| ______________________________________________^
30 | | .into_iter()
| |____________________^ help: consider removing `.into_iter()`: `(0..n_chunks)`
|
= 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`
Check warning on line 255 in halo2_proofs/examples/folding.rs
github-actions / Clippy (beta)
unused variable: `circuit3`
warning: unused variable: `circuit3`
--> halo2_proofs/examples/folding.rs:255:9
|
255 | let circuit3 = MyCircuit::<pallas::Scalar, W, H>::rand(&mut rng);
| ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_circuit3`
|
= note: `#[warn(unused_variables)]` on by default
Check warning on line 6 in halo2_proofs/examples/folding.rs
github-actions / Clippy (beta)
unused import: `VerificationStrategy`
warning: unused import: `VerificationStrategy`
--> halo2_proofs/examples/folding.rs:6:44
|
6 | poly::{self, commitment::ParamsProver, VerificationStrategy},
| ^^^^^^^^^^^^^^^^^^^^
Check warning on line 12 in halo2_proofs/examples/folding.rs
github-actions / Clippy (beta)
unused import: `TranscriptReadBuffer`
warning: unused import: `TranscriptReadBuffer`
--> halo2_proofs/examples/folding.rs:12:46
|
12 | transcript::{Blake2bWrite, Challenge255, TranscriptReadBuffer, TranscriptWriterBuffer},
| ^^^^^^^^^^^^^^^^^^^^
Check warning on line 1 in halo2_proofs/examples/folding.rs
github-actions / Clippy (beta)
unused import: `FromUniformBytes`
warning: unused import: `FromUniformBytes`
--> halo2_proofs/examples/folding.rs:1:23
|
1 | use ff::{BatchInvert, FromUniformBytes};
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 113 in halo2_gadgets/src/sha256/table16/util.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_gadgets/src/sha256/table16/util.rs:113:31
|
113 | let carry = sum.map(|sum| (sum >> 32) as u64);
| ^^^^^^^^^^^^^^^^^^ help: try: `(sum >> 32)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 180 in halo2_gadgets/src/sha256/table16/message_schedule/subregion3.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_gadgets/src/sha256/table16/message_schedule/subregion3.rs:180:57
|
180 | || carry.map(|carry| pallas::Base::from(carry as u64)),
| ^^^^^^^^^^^^ help: try: `carry`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 264 in halo2_gadgets/src/sha256/table16/message_schedule/subregion2.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_gadgets/src/sha256/table16/message_schedule/subregion2.rs:264:57
|
264 | || carry.map(|carry| pallas::Base::from(carry as u64)),
| ^^^^^^^^^^^^ help: try: `carry`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 56 in halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs:56:34
|
56 | + DECOMPOSE_0_ROWS * (word_idx - 62) as usize
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(word_idx - 62)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 50 in halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs:50:34
|
50 | + SUBREGION_3_WORD * (word_idx - 49) as usize
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(word_idx - 49)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 43 in halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_gadgets/src/sha256/table16/message_schedule/schedule_util.rs:43:47
|
43 | SUBREGION_0_ROWS + SUBREGION_1_WORD * (word_idx - 1) as usize
| ^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(word_idx - 1)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 786 in halo2_gadgets/src/sha256/table16/compression/compression_util.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`u64` -> `u64`)
warning: casting to the same type is unnecessary (`u64` -> `u64`)
--> halo2_gadgets/src/sha256/table16/compression/compression_util.rs:786:65
|
786 | || h_prime_carry.map(|value| pallas::Base::from(value as u64)),
| ^^^^^^^^^^^^ help: try: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
Check warning on line 114 in halo2_gadgets/src/sha256/table16/compression/compression_util.rs
github-actions / Clippy (beta)
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> halo2_gadgets/src/sha256/table16/compression/compression_util.rs:114:13
|
114 | (idx as usize) * SUBREGION_MAIN_WORD
| ^^^^^^^^^^^^^^ help: try: `idx`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `-W clippy::unnecessary-cast` implied by `-W clippy::all`
Check warning on line 51 in halo2_gadgets/src/poseidon/primitives/p128pow5t3.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/primitives/p128pow5t3.rs:51:25
|
51 | 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_borrow
Check warning on line 25 in halo2_gadgets/src/poseidon/primitives/p128pow5t3.rs
github-actions / Clippy (beta)
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> halo2_gadgets/src/poseidon/primitives/p128pow5t3.rs:25:25
|
25 | 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_borrow
Check warning on line 513 in halo2_gadgets/src/poseidon/pow5.rs
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:513:77
|
513 | 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_borrow