Skip to content

Dump advice cells too #2

Dump advice cells too

Dump advice cells too #2

GitHub Actions / Clippy (beta) succeeded Sep 9, 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.82.0-beta.2 (c7c49f44a 2024-09-04)
  • cargo 1.82.0-beta.2 (8f40fc59f 2024-08-21)
  • clippy 0.1.82 (c7c49f4 2024-09-04)

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 180 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

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

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
   --> halo2_gadgets/src/utilities.rs:176:1
    |
176 | / /// Decompose a word `alpha` into `window_num_bits` bits (little-endian)
177 | | /// For a window size of `w`, this returns [k_0, ..., k_n] where each `k_i`
178 | | /// is a `w`-bit value, and `scalar = k_0 + k_1 * w + k_n * w^n`.
179 | | ///
180 | | /// # Panics
    | |_
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

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 52 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: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 6 in halo2_gadgets/src/utilities/decompose_running_sum.rs

See this annotation in the file changed.

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

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
 --> halo2_gadgets/src/utilities/decompose_running_sum.rs:1:1
  |
1 | / //! Decomposes an $n$-bit field element $\alpha$ into $W$ windows, each window
2 | | //! being a $K$-bit word, using a running sum $z$.
3 | | //! We constrain $K \leq 3$ for this helper.
4 | | //!     $$\alpha = k_0 + (2^K) k_1 + (2^{2K}) k_2 + ... + (2^{(W-1)K}) k_{W-1}$$
5 | | //!
6 | | //! $z_0$ is initialized as $\alpha$. Each successive $z_{i+1}$ is computed as
  | |_
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

Check warning on line 659 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:659:48
    |
659 | ...                   .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/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/core/src/iter/traits/iterator.rs:479:12
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion

Check warning on line 658 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:658:48
    |
658 | ...                   .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/c7c49f44a7bb561dd9317e14908a1e50fa478ce5/library/core/src/iter/traits/iterator.rs:479: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 24 in halo2_gadgets/src/sinsemilla.rs

See this annotation in the file changed.

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

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
  --> halo2_gadgets/src/sinsemilla.rs:21:1
   |
21 | / /// The set of circuit instructions required to use the [`Sinsemilla`](https://zcash.github.io/halo2/design/gadgets/sinsemilla.html) gadget.
22 | | /// This trait is bounded on two constant parameters: `K`, the number of bits
23 | | /// in each word accepted by the Sinsemilla hash, and `MAX_WORDS`, the maximum
24 | | /// number of words that a single hash instance can process.
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
help: add an empty line
   |
21 ~ /// The set of circuit instructions required to use the [`Sinsemilla`](https://zcash.github.io/halo2/design/gadgets/sinsemilla.html) gadget.
22 + ///
   |

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 180 in halo2_gadgets/src/utilities.rs

See this annotation in the file changed.

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

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
   --> halo2_gadgets/src/utilities.rs:176:1
    |
176 | / /// Decompose a word `alpha` into `window_num_bits` bits (little-endian)
177 | | /// For a window size of `w`, this returns [k_0, ..., k_n] where each `k_i`
178 | | /// is a `w`-bit value, and `scalar = k_0 + k_1 * w + k_n * w^n`.
179 | | ///
180 | | /// # Panics
    | |_
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

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 52 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: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 6 in halo2_gadgets/src/utilities/decompose_running_sum.rs

See this annotation in the file changed.

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

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
 --> halo2_gadgets/src/utilities/decompose_running_sum.rs:1:1
  |
1 | / //! Decomposes an $n$-bit field element $\alpha$ into $W$ windows, each window
2 | | //! being a $K$-bit word, using a running sum $z$.
3 | | //! We constrain $K \leq 3$ for this helper.
4 | | //!     $$\alpha = k_0 + (2^K) k_1 + (2^{2K}) k_2 + ... + (2^{(W-1)K}) k_{W-1}$$
5 | | //!
6 | | //! $z_0$ is initialized as $\alpha$. Each successive $z_{i+1}$ is computed as
  | |_
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph

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

See this annotation in the file changed.

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

first doc comment paragraph is too long

warning: first doc comment paragraph is too long
  --> halo2_gadgets/src/sinsemilla.rs:21:1
   |
21 | / /// The set of circuit instructions required to use the [`Sinsemilla`](https://zcash.github.io/halo2/design/gadgets/sinsemilla.html) gadget.
22 | | /// This trait is bounded on two constant parameters: `K`, the number of bits
23 | | /// in each word accepted by the Sinsemilla hash, and `MAX_WORDS`, the maximum
24 | | /// number of words that a single hash instance can process.
   | |_
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_long_first_doc_paragraph
help: add an empty line
   |
21 ~ /// The set of circuit instructions required to use the [`Sinsemilla`](https://zcash.github.io/halo2/design/gadgets/sinsemilla.html) gadget.
22 + ///
   |

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)]`