Skip to content

expose value_dev

expose value_dev #377

GitHub Actions / Clippy (beta) succeeded Sep 27, 2024 in 0s

Clippy (beta)

11 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 11
Note 0
Help 0

Versions

  • rustc 1.76.0-nightly (90e321d82 2023-12-02)
  • cargo 1.76.0-nightly (26333c732 2023-11-28)
  • clippy 0.1.76 (90e321d 2023-12-02)

Annotations

Check warning on line 228 in halo2_proofs/src/helpers.rs

See this annotation in the file changed.

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

accessing first element with `slice.get(0)`

warning: accessing first element with `slice.get(0)`
   --> halo2_proofs/src/helpers.rs:228:40
    |
228 |     4 + slice.len() * (4 + field_len * slice.get(0).map(|poly| poly.len()).unwrap_or(0))
    |                                        ^^^^^^^^^^^^ help: try: `slice.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-W clippy::get-first` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`

Check warning on line 93 in halo2_proofs/src/helpers.rs

See this annotation in the file changed.

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

items after a test module

warning: items after a test module
   --> halo2_proofs/src/helpers.rs:93:1
    |
93  |   mod test {
    |   ^^^^^^^^
...
116 |   pub trait SerdeCurveAffine: CurveAffine + SerdeObject {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
140 |   impl<C: CurveAffine + SerdeObject> SerdeCurveAffine for C {}
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
141 |
142 |   pub trait SerdePrimeField: PrimeField + SerdeObject {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
175 |   impl<F: PrimeField + SerdeObject> SerdePrimeField for F {}
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
181 |   pub fn pack(bits: &[bool]) -> u8 {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
192 |   pub fn unpack(byte: u8, bits: &mut [bool]) {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
199 | / pub(crate) fn read_polynomial_vec<R: io::Read, F: SerdePrimeField, B>(
200 | |     reader: &mut R,
201 | |     format: SerdeFormat,
202 | | ) -> io::Result<Vec<Polynomial<F, B>>> {
    | |______________________________________^
...
213 | / pub(crate) fn write_polynomial_slice<W: io::Write, F: SerdePrimeField, B>(
214 | |     slice: &[Polynomial<F, B>],
215 | |     writer: &mut W,
216 | |     format: SerdeFormat,
217 | | ) -> io::Result<()> {
    | |___________________^
...
226 |   pub(crate) fn polynomial_slice_byte_length<F: PrimeField, B>(slice: &[Polynomial<F, B>]) -> usize {
    |   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module
    = note: `-W clippy::items-after-test-module` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::items_after_test_module)]`
    = help: move the items to before the test module was defined

Check warning on line 636 in halo2_proofs/src/dev.rs

See this annotation in the file changed.

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

you seem to use `.enumerate()` and immediately discard the index

warning: you seem to use `.enumerate()` and immediately discard the index
   --> halo2_proofs/src/dev.rs:636:32
    |
636 |         for (_i, sub_range) in ranges.iter().enumerate() {
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
    = note: `-W clippy::unused-enumerate-index` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::unused_enumerate_index)]`
help: remove the `.enumerate()` call
    |
636 |         for sub_range in ranges.iter() {
    |             ~~~~~~~~~    ~~~~~~~~~~~~~

Check warning on line 228 in halo2_proofs/src/helpers.rs

See this annotation in the file changed.

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

accessing first element with `slice.get(0)`

warning: accessing first element with `slice.get(0)`
   --> halo2_proofs/src/helpers.rs:228:40
    |
228 |     4 + slice.len() * (4 + field_len * slice.get(0).map(|poly| poly.len()).unwrap_or(0))
    |                                        ^^^^^^^^^^^^ help: try: `slice.first()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
    = note: `-W clippy::get-first` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::get_first)]`

Check warning on line 636 in halo2_proofs/src/dev.rs

See this annotation in the file changed.

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

you seem to use `.enumerate()` and immediately discard the index

warning: you seem to use `.enumerate()` and immediately discard the index
   --> halo2_proofs/src/dev.rs:636:32
    |
636 |         for (_i, sub_range) in ranges.iter().enumerate() {
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_enumerate_index
    = note: `-W clippy::unused-enumerate-index` implied by `-W clippy::all`
    = help: to override `-W clippy::all` add `#[allow(clippy::unused_enumerate_index)]`
help: remove the `.enumerate()` call
    |
636 |         for sub_range in ranges.iter() {
    |             ~~~~~~~~~    ~~~~~~~~~~~~~

Check warning on line 110 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

unused doc comment

warning: unused doc comment
   --> halo2_proofs/src/dev/cost.rs:110:13
    |
110 |             /// Selector assignments used for optimization pass
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 |             selectors: vec![vec![false; n]; num_selectors],
    |             ---------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

Check warning on line 108 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

unused doc comment

warning: unused doc comment
   --> halo2_proofs/src/dev/cost.rs:108:13
    |
108 |             /// Pairs of cells between which we have equality constraints.
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109 |             equality: vec![],
    |             ---------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

Check warning on line 110 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

unused doc comment

warning: unused doc comment
   --> halo2_proofs/src/dev/cost.rs:110:13
    |
110 |             /// Selector assignments used for optimization pass
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
111 |             selectors: vec![vec![false; n]; num_selectors],
    |             ---------------------------------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

Check warning on line 108 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

unused doc comment

warning: unused doc comment
   --> halo2_proofs/src/dev/cost.rs:108:13
    |
108 |             /// Pairs of cells between which we have equality constraints.
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
109 |             equality: vec![],
    |             ---------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment

Check warning on line 106 in halo2_proofs/src/dev/cost.rs

See this annotation in the file changed.

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

unused doc comment

warning: unused doc comment
   --> halo2_proofs/src/dev/cost.rs:106:13
    |
106 |             /// Any cells assigned outside of a region.
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
107 |             loose_cells: vec![],
    |             ------------------- rustdoc does not generate documentation for expression fields
    |
    = help: use `//` for a plain comment
    = note: `#[warn(unused_doc_comments)]` on by default

Check warning on line 12 in halo2_proofs/src/multicore.rs

See this annotation in the file changed.

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

unused imports: `Scope`, `join`

warning: unused imports: `Scope`, `join`
  --> halo2_proofs/src/multicore.rs:12:5
   |
12 |     join, scope, Scope,
   |     ^^^^         ^^^^^
   |
   = note: `#[warn(unused_imports)]` on by default