Skip to content
GitHub Actions / Clippy (beta) failed Sep 26, 2023 in 1s

Clippy (beta)

1 error, 58 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 1
Warning 58
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 200 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

@github-actions 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 failure on line 656 in halo2_proofs/src/protostar/verifier.rs

See this annotation in the file changed.

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

not all trait items implemented, missing: `Params`

error[E0046]: not all trait items implemented, missing: `Params`
   --> halo2_proofs/src/protostar/verifier.rs:655:5
    |
655 | /     impl<F: PrimeFieldBits, const RANGE: usize, const LOOKUP_RANGE: usize> Circuit<F>
656 | |         for RangeCheckCircuit<F, RANGE, LOOKUP_RANGE>
    | |_____________________________________________________^ missing `Params` in implementation
    |
   ::: halo2_proofs/src/plonk/circuit.rs:774:5
    |
774 |       type Params: Default;
    |       -------------------- `Params` from trait

Check warning on line 113 in halo2_gadgets/src/sha256/table16/util.rs

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

See this annotation in the file changed.

@github-actions 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

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/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

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/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

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: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

Check warning on line 473 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:473:73
    |
473 |                 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_borrow

Check warning on line 447 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:447:62
    |
447 |             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_borrow

Check warning on line 138 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:138:25
    |
138 |         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
    = note: `-W clippy::needless-borrow` implied by `-W clippy::all`

Check warning on line 397 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:397:42
    |
397 |             .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_borrow

Check warning on line 392 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:392:37
    |
392 |             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_borrow

Check warning on line 375 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:375:68
    |
375 |         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_borrow

Check warning on line 147 in halo2_gadgets/benches/sha256.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/sha256.rs:147:35
    |
147 |     let mut proof_fs = File::open(&proof_path).expect("couldn't load sha256_proof");
    |                                   ^^^^^^^^^^^ help: change this to: `proof_path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 143 in halo2_gadgets/benches/sha256.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/sha256.rs:143:37
    |
143 |         let mut file = File::create(&proof_path).expect("Failed to create sha256_proof");
    |                                     ^^^^^^^^^^^ help: change this to: `proof_path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 131 in halo2_gadgets/benches/sha256.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/sha256.rs:131:19
    |
131 |     if File::open(&proof_path).is_err() {
    |                   ^^^^^^^^^^^ help: change this to: `proof_path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 104 in halo2_gadgets/benches/sha256.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/sha256.rs:104:32
    |
104 |     let params_fs = File::open(&params_path).expect("couldn't load sha256_params");
    |                                ^^^^^^^^^^^^ help: change this to: `params_path`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 98 in halo2_gadgets/benches/sha256.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/sha256.rs:98:37
   |
98 |         let mut file = File::create(&params_path).expect("Failed to create sha256_params");
   |                                     ^^^^^^^^^^^^ help: change this to: `params_path`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 93 in halo2_gadgets/benches/sha256.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/sha256.rs:93:19
   |
93 |     if File::open(&params_path).is_err() {
   |                   ^^^^^^^^^^^^ help: change this to: `params_path`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
   = note: `-W clippy::needless-borrow` implied by `-W clippy::all`