Skip to content

value coverage

value coverage #17

GitHub Actions / Clippy (beta) succeeded May 20, 2024 in 0s

Clippy (beta)

22 warnings

Details

Results

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

Versions

  • rustc 1.73.0 (cc66ad468 2023-10-03)
  • cargo 1.73.0 (9c4383fb5 2023-08-26)
  • clippy 0.1.73 (cc66ad4 2023-10-03)

Annotations

Check warning on line 230 in halo2_frontend/src/dev/tfp.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used

warning: unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used
   --> halo2_frontend/src/dev/tfp.rs:227:5
    |
227 | /     value.value().assert_if_known(|v| {
228 | |         debug!(target: "assigned", value = ?v);
229 | |         true
230 | |     });
    | |______^
    |
help: use `let _ = ...` to ignore the resulting value
    |
227 |     let _ = value.value().assert_if_known(|v| {
    |     +++++++

Check warning on line 792 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used

warning: unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used
   --> halo2_frontend/src/circuit/value.rs:792:9
    |
792 |         V::known(1).assert_if_known(|v| *v == 2);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: use `let _ = ...` to ignore the resulting value
    |
792 |         let _ = V::known(1).assert_if_known(|v| *v == 2);
    |         +++++++

Check warning on line 786 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used

warning: unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used
   --> halo2_frontend/src/circuit/value.rs:786:9
    |
786 |         V::unknown().assert_if_known(|v| *v == 1);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: use `let _ = ...` to ignore the resulting value
    |
786 |         let _ = V::unknown().assert_if_known(|v| *v == 1);
    |         +++++++

Check warning on line 785 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used

warning: unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used
   --> halo2_frontend/src/circuit/value.rs:785:9
    |
785 |         V::known(1).assert_if_known(|v| *v == 1);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: use `let _ = ...` to ignore the resulting value
    |
785 |         let _ = V::known(1).assert_if_known(|v| *v == 1);
    |         +++++++

Check warning on line 778 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::map` that must be used

warning: unused return value of `circuit::value::Value::<V>::map` that must be used
   --> halo2_frontend/src/circuit/value.rs:778:9
    |
778 |         v_none.as_mut().map(|v| *v=3);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
help: use `let _ = ...` to ignore the resulting value
    |
778 |         let _ = v_none.as_mut().map(|v| *v=3);
    |         +++++++

Check warning on line 777 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::map` that must be used

warning: unused return value of `circuit::value::Value::<V>::map` that must be used
   --> halo2_frontend/src/circuit/value.rs:777:9
    |
777 |         v_some.as_mut().map(|v| *v=3);
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
777 |         let _ = v_some.as_mut().map(|v| *v=3);
    |         +++++++

Check warning on line 877 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

needlessly taken reference of both operands

warning: needlessly taken reference of both operands
   --> halo2_frontend/src/circuit/value.rs:877:20
    |
877 |         assert_eq!(&V::known(5) * &V::known(2), V::known(10));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
    |
877 |         assert_eq!(V::known(5) * V::known(2), V::known(10));
    |                    ~~~~~~~~~~~   ~~~~~~~~~~~

Check warning on line 876 in halo2_frontend/src/circuit/value.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_frontend/src/circuit/value.rs:876:20
    |
876 |         assert_eq!(V::known(5) * &V::known(2), V::known(10));
    |                    ^^^^^^^^^^^^^^------------
    |                                  |
    |                                  help: use the right value directly: `V::known(2)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

Check warning on line 875 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

needlessly taken reference of left operand

warning: needlessly taken reference of left operand
   --> halo2_frontend/src/circuit/value.rs:875:20
    |
875 |         assert_eq!(&V::known(5) * V::known(2), V::known(10));
    |                    ------------^^^^^^^^^^^^^^
    |                    |
    |                    help: use the left value directly: `V::known(5)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

Check warning on line 872 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

needlessly taken reference of both operands

warning: needlessly taken reference of both operands
   --> halo2_frontend/src/circuit/value.rs:872:20
    |
872 |         assert_eq!(&V::known(5) - &V::known(2), V::known(3));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
    |
872 |         assert_eq!(V::known(5) - V::known(2), V::known(3));
    |                    ~~~~~~~~~~~   ~~~~~~~~~~~

Check warning on line 871 in halo2_frontend/src/circuit/value.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_frontend/src/circuit/value.rs:871:20
    |
871 |         assert_eq!(V::known(5) - &V::known(2), V::known(3));
    |                    ^^^^^^^^^^^^^^------------
    |                                  |
    |                                  help: use the right value directly: `V::known(2)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

Check warning on line 870 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

needlessly taken reference of left operand

warning: needlessly taken reference of left operand
   --> halo2_frontend/src/circuit/value.rs:870:20
    |
870 |         assert_eq!(&V::known(5) - V::known(2), V::known(3));
    |                    ------------^^^^^^^^^^^^^^
    |                    |
    |                    help: use the left value directly: `V::known(5)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

Check warning on line 867 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

needlessly taken reference of both operands

warning: needlessly taken reference of both operands
   --> halo2_frontend/src/circuit/value.rs:867:20
    |
867 |         assert_eq!(&V::known(5) + &V::known(2), V::known(7));
    |                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
help: use the values directly
    |
867 |         assert_eq!(V::known(5) + V::known(2), V::known(7));
    |                    ~~~~~~~~~~~   ~~~~~~~~~~~

Check warning on line 866 in halo2_frontend/src/circuit/value.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_frontend/src/circuit/value.rs:866:20
    |
866 |         assert_eq!(V::known(5) + &V::known(2), V::known(7));
    |                    ^^^^^^^^^^^^^^------------
    |                                  |
    |                                  help: use the right value directly: `V::known(2)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref

Check warning on line 865 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

needlessly taken reference of left operand

warning: needlessly taken reference of left operand
   --> halo2_frontend/src/circuit/value.rs:865:20
    |
865 |         assert_eq!(&V::known(5) + V::known(2), V::known(7));
    |                    ------------^^^^^^^^^^^^^^
    |                    |
    |                    help: use the left value directly: `V::known(5)`
    |
    = 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 91 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`

warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
  --> halo2_frontend/src/circuit/value.rs:91:5
   |
91 |     pub fn error_if_known_and<F: FnOnce(&V) -> bool>(&self, f: F) -> Result<(), Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: either add some descriptive text or remove the attribute
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use

Check warning on line 80 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

this unit-returning function has a `#[must_use]` attribute

warning: this unit-returning function has a `#[must_use]` attribute
  --> halo2_frontend/src/circuit/value.rs:80:5
   |
79 |     #[must_use]
   |     ----------- help: remove the attribute
80 |     pub fn assert_if_known<F: FnOnce(&V) -> bool>(&self, f: F) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_unit
   = note: `-W clippy::must-use-unit` implied by `-W clippy::all`

Check warning on line 51 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`

warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
  --> halo2_frontend/src/circuit/value.rs:51:5
   |
51 |     pub fn assign(self) -> Result<V, Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: either add some descriptive text or remove the attribute
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
   = note: `-W clippy::double-must-use` implied by `-W clippy::all`

Check warning on line 230 in halo2_frontend/src/dev/tfp.rs

See this annotation in the file changed.

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

unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used

warning: unused return value of `circuit::value::Value::<V>::assert_if_known` that must be used
   --> halo2_frontend/src/dev/tfp.rs:227:5
    |
227 | /     value.value().assert_if_known(|v| {
228 | |         debug!(target: "assigned", value = ?v);
229 | |         true
230 | |     });
    | |______^
    |
    = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
    |
227 |     let _ = value.value().assert_if_known(|v| {
    |     +++++++

Check warning on line 91 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`

warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
  --> halo2_frontend/src/circuit/value.rs:91:5
   |
91 |     pub fn error_if_known_and<F: FnOnce(&V) -> bool>(&self, f: F) -> Result<(), Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: either add some descriptive text or remove the attribute
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use

Check warning on line 80 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

this unit-returning function has a `#[must_use]` attribute

warning: this unit-returning function has a `#[must_use]` attribute
  --> halo2_frontend/src/circuit/value.rs:80:5
   |
79 |     #[must_use]
   |     ----------- help: remove the attribute
80 |     pub fn assert_if_known<F: FnOnce(&V) -> bool>(&self, f: F) {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#must_use_unit
   = note: `-W clippy::must-use-unit` implied by `-W clippy::all`

Check warning on line 51 in halo2_frontend/src/circuit/value.rs

See this annotation in the file changed.

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

this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`

warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`
  --> halo2_frontend/src/circuit/value.rs:51:5
   |
51 |     pub fn assign(self) -> Result<V, Error> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: either add some descriptive text or remove the attribute
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use
   = note: `-W clippy::double-must-use` implied by `-W clippy::all`