Skip to content
GitHub Actions / Clippy (beta) succeeded Feb 7, 2024 in 0s

Clippy (beta)

44 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 44
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 1216 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

taken reference of right operand

warning: taken reference of right operand
    --> halo2_backend/src/plonk/evaluation.rs:1216:25
     |
1216 |                 &|a, b| a + &b,
     |                         ^^^^--
     |                             |
     |                             help: use the right value directly: `b`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

Check warning on line 1151 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

this function has too many arguments (13/7)

warning: this function has too many arguments (13/7)
    --> halo2_backend/src/plonk/evaluation.rs:1137:5
     |
1137 | /     pub fn evaluate<B: Basis>(
1138 | |         &self,
1139 | |         data: &mut EvaluationData<C>,
1140 | |         fixed: &[Option<Polynomial<C::ScalarExt, B>>],
...    |
1150 | |         isize: i32,
1151 | |     ) -> C::ScalarExt {
     | |_____________________^
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 956 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

manual implementation of an assign operation

warning: manual implementation of an assign operation
   --> halo2_backend/src/plonk/evaluation.rs:956:13
    |
956 |             idx = idx + 1;
    |             ^^^^^^^^^^^^^ help: replace it with: `idx += 1`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

Check warning on line 942 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

manual implementation of an assign operation

warning: manual implementation of an assign operation
   --> halo2_backend/src/plonk/evaluation.rs:942:33
    |
942 | ...                   *value = *value * y_power;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*value *= y_power`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

Check warning on line 678 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

manual implementation of an assign operation

warning: manual implementation of an assign operation
   --> halo2_backend/src/plonk/evaluation.rs:678:37
    |
678 | ...                   *value = *value * y_skip;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*value *= y_skip`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

Check warning on line 673 in halo2_backend/src/plonk/evaluation.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_backend/src/plonk/evaluation.rs:673:57
    |
673 | ...                   * omega.pow_vartime(&[start as u64, 0, 0, 0]);
    |                                           ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[start as u64, 0, 0, 0]`
    |
    = 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 600 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

manual implementation of an assign operation

warning: manual implementation of an assign operation
   --> halo2_backend/src/plonk/evaluation.rs:600:37
    |
600 | ...                   *value = *value * y_skip;
    |                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `*value *= y_skip`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
    = note: `-W clippy::assign-op-pattern` implied by `-W clippy::all`

Check warning on line 528 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

taken reference of right operand

warning: taken reference of right operand
   --> halo2_backend/src/plonk/evaluation.rs:528:39
    |
528 |                     let delta_start = beta * &C::Scalar::ZETA;
    |                                       ^^^^^^^----------------
    |                                              |
    |                                              help: use the right value directly: `C::Scalar::ZETA`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
    = note: `-W clippy::op-ref` implied by `-W clippy::all`

Check warning on line 418 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

the loop variable `cluster_idx` is used to index `value_part_clusters`

warning: the loop variable `cluster_idx` is used to index `value_part_clusters`
   --> halo2_backend/src/plonk/evaluation.rs:418:28
    |
418 |         for cluster_idx in 0..num_clusters {
    |                            ^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
    = note: `-W clippy::needless-range-loop` implied by `-W clippy::all`
help: consider using an iterator and enumerate()
    |
418 |         for (cluster_idx, <item>) in value_part_clusters.iter_mut().enumerate().take(num_clusters) {
    |             ~~~~~~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 392 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

this function has too many arguments (11/7)

warning: this function has too many arguments (11/7)
   --> halo2_backend/src/plonk/evaluation.rs:380:5
    |
380 | /     pub(in crate::plonk) fn evaluate_h(
381 | |         &self,
382 | |         pk: &ProvingKey<C>,
383 | |         advice_polys: &[&[Polynomial<C::ScalarExt, Coeff>]],
...   |
391 | |         permutations: &[permutation::prover::Committed<C>],
392 | |     ) -> Polynomial<C::ScalarExt, ExtendedLagrangeCoeff> {
    | |________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `-W clippy::too-many-arguments` implied by `-W clippy::all`

Check warning on line 198 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> halo2_backend/src/plonk/evaluation.rs:194:14
    |
194 |       lookups: Vec<(
    |  ______________^
195 | |         GraphEvaluator<C>,
196 | |         usize,
197 | |         (Vec<usize>, Vec<usize>, Vec<usize>),
198 | |     )>,
    | |______^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `-W clippy::type-complexity` implied by `-W clippy::all`

Check warning on line 409 in halo2_common/src/poly/domain.rs

See this annotation in the file changed.

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

unused return value of `std::ops::Add::add` that must be used

warning: unused return value of `std::ops::Add::add` that must be used
   --> halo2_common/src/poly/domain.rs:409:17
    |
409 |                 value.add(other);
    |                 ^^^^^^^^^^^^^^^^
    |
    = note: this returns the result of the operation, without modifying the original
help: use `let _ = ...` to ignore the resulting value
    |
409 |                 let _ = value.add(other);
    |                 +++++++

Check warning on line 402 in halo2_common/src/poly/domain.rs

See this annotation in the file changed.

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

unused return value of `std::ops::Add::add` that must be used

warning: unused return value of `std::ops::Add::add` that must be used
   --> halo2_common/src/poly/domain.rs:402:21
    |
402 |                     other.add(current);
    |                     ^^^^^^^^^^^^^^^^^^
    |
    = note: this returns the result of the operation, without modifying the original
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
402 |                     let _ = other.add(current);
    |                     +++++++

Check warning on line 871 in halo2_common/src/poly/domain.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_common/src/poly/domain.rs:871:25
    |
871 |             poly.resize(domain.extended_len() as usize, Scalar::zero());
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `domain.extended_len()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 821 in halo2_common/src/poly/domain.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_common/src/poly/domain.rs:821:25
    |
821 |             poly.resize(domain.extended_len() as usize, Scalar::zero());
    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `domain.extended_len()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast

Check warning on line 520 in halo2_common/src/poly/domain.rs

See this annotation in the file changed.

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

manual implementation of an assign operation

warning: manual implementation of an assign operation
   --> halo2_common/src/poly/domain.rs:520:17
    |
520 |                 c_power = c_power * c;
    |                 ^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `c_power *= c`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern

Check warning on line 517 in halo2_common/src/poly/domain.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_common/src/poly/domain.rs:517:45
    |
517 |             let mut c_power = c.pow_vartime(&[index as u64, 0, 0, 0]);
    |                                             ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `[index as u64, 0, 0, 0]`
    |
    = 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 408 in halo2_common/src/poly/domain.rs

See this annotation in the file changed.

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

this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`

warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
   --> halo2_common/src/poly/domain.rs:408:73
    |
408 |             for (value, other) in values.iter_mut().zip(result[start..].into_iter()) {
    |                                                                         ^^^^^^^^^ help: call directly: `iter`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
    = note: `-W clippy::into-iter-on-ref` implied by `-W clippy::all`

Check warning on line 376 in halo2_common/src/poly/domain.rs

See this annotation in the file changed.

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

manual implementation of an assign operation

warning: manual implementation of an assign operation
   --> halo2_common/src/poly/domain.rs:376:17
    |
376 |                 i = i << 1;
    |                 ^^^^^^^^^^ help: replace it with: `i <<= 1`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
    = note: `-W clippy::assign-op-pattern` implied by `-W clippy::all`

Check warning on line 177 in halo2_common/src/poly/domain.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_common/src/poly/domain.rs:177:34
    |
177 |         assert_eq!(values.len(), (self.extended_len() >> self.k) as usize);
    |                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `{ (self.extended_len() >> self.k) }`
    |
    = 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 568 in halo2_proofs/tests/plonk_api.rs

See this annotation in the file changed.

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

function `test_plonk_api_shplonk` is never used

warning: function `test_plonk_api_shplonk` is never used
   --> halo2_proofs/tests/plonk_api.rs:568:8
    |
568 |     fn test_plonk_api_shplonk() {
    |        ^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

Check warning on line 377 in halo2_proofs/tests/plonk_api.rs

See this annotation in the file changed.

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

operator precedence can trip the unwary

warning: operator precedence can trip the unwary
   --> halo2_proofs/tests/plonk_api.rs:377:25
    |
377 |             for _ in 0..1 << K - 2 {
    |                         ^^^^^^^^^^ help: consider parenthesizing your expression: `1 << (K - 2)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#precedence
    = note: `-W clippy::precedence` implied by `-W clippy::all`

Check warning on line 15 in halo2_backend/src/plonk/evaluation.rs

See this annotation in the file changed.

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

unused import: `super::shuffle`

warning: unused import: `super::shuffle`
  --> halo2_backend/src/plonk/evaluation.rs:15:5
   |
15 | use super::shuffle;
   |     ^^^^^^^^^^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default

Check warning on line 24 in halo2_proofs/src/lib.rs

See this annotation in the file changed.

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

this is an outer doc comment and does not apply to the parent module or crate

warning: this is an outer doc comment and does not apply to the parent module or crate
  --> halo2_proofs/src/lib.rs:23:1
   |
23 | / ///! This module provides common utilities, traits and structures for group,
24 | | ///! field and polynomial arithmetic.
   | |_____________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_doc_comments
   = note: `-W clippy::suspicious-doc-comments` implied by `-W clippy::all`
help: use an inner doc comment to document the parent module or crate
   |
23 + //! This module provides common utilities, traits and structures for group,
24 + //! field and polynomial arithmetic.
   |

Check warning on line 24 in halo2_proofs/src/lib.rs

See this annotation in the file changed.

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

this is an outer doc comment and does not apply to the parent module or crate

warning: this is an outer doc comment and does not apply to the parent module or crate
  --> halo2_proofs/src/lib.rs:23:1
   |
23 | / ///! This module provides common utilities, traits and structures for group,
24 | | ///! field and polynomial arithmetic.
   | |_____________________________________^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_doc_comments
   = note: `-W clippy::suspicious-doc-comments` implied by `-W clippy::all`
help: use an inner doc comment to document the parent module or crate
   |
23 + //! This module provides common utilities, traits and structures for group,
24 + //! field and polynomial arithmetic.
   |