Remove unused import #77
Clippy (beta)
2 errors, 45 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 2 |
Warning | 45 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0-beta.6 (9b9539791 2023-09-17)
- cargo 1.73.0-beta.6 (9c4383fb5 2023-08-26)
- clippy 0.1.73 (9b95397 2023-09-17)
Annotations
Check warning on line 127 in halo2_gadgets/src/utilities.rs
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
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
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 52 in halo2_gadgets/src/utilities/lookup_range_check.rs
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:52:38
|
52 | _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 267 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs
github-actions / Clippy (beta)
unused import: `prime::PrimeCurveAffine`
warning: unused import: `prime::PrimeCurveAffine`
--> halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs:267:25
|
267 | use group::{prime::PrimeCurveAffine, Curve};
| ^^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 267 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs
github-actions / Clippy (beta)
unused import: `Curve`
warning: unused import: `Curve`
--> halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs:267:50
|
267 | use group::{prime::PrimeCurveAffine, Curve};
| ^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check failure on line 296 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs
github-actions / Clippy (beta)
mismatched types
error[E0308]: mismatched types
--> halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs:296:51
|
19 | impl<Hash, Commit, Fixed> SinsemillaChip<Hash, Commit, Fixed>
| ----- this type parameter
...
296 | expected_point.to_affine() == actual_point
| ^^^^^^^^^^^^ expected type parameter `Fixed`, found `EpAffine`
|
= note: expected type parameter `Fixed`
found struct `pasta_curves::EpAffine`
Check failure on line 293 in halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs
github-actions / Clippy (beta)
no method named `to_curve` found for reference `&ecc::chip::NonIdentityEccPoint` in the current scope
error[E0599]: no method named `to_curve` found for reference `&ecc::chip::NonIdentityEccPoint` in the current scope
--> halo2_gadgets/src/sinsemilla/chip/hash_to_point.rs:293:33
|
293 | .fold(Q.to_curve(), |acc, chunk| (acc + S(chunk)) + acc);
| ^^^^^^^^ method not found in `&NonIdentityEccPoint`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `to_curve`, perhaps you need to implement one of them:
candidate #1: `group::cofactor::CofactorCurveAffine`
candidate #2: `group::prime::PrimeCurveAffine`
Check warning on line 206 in halo2_gadgets/src/poseidon.rs
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
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
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
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
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 72 in halo2_gadgets/src/poseidon/primitives/grain.rs
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`
Check warning on line 511 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:511:77
|
511 | 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 471 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:471:73
|
471 | 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 445 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:445:62
|
445 | 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 265 in halo2_gadgets/src/poseidon/pow5.rs
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
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
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`
Check warning on line 395 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
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_borrow
Check warning on line 390 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
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_borrow
Check warning on line 373 in halo2_gadgets/src/ecc/chip/mul_fixed.rs
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_borrow
Check warning on line 220 in halo2_gadgets/src/ecc/chip/constants.rs
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_borrow
Check warning on line 217 in halo2_gadgets/src/ecc/chip/constants.rs
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:217:42
|
217 | acc + C::Scalar::from(2).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