update Cargo.lock #146
Annotations
196 warnings
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L149
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:149:5
|
149 | state[0].clone()
| ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state[0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L146
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:146:57
|
146 | state[i] = poseidon(&[state[2 * i].clone(), state[2 * i + 1].clone()], params);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state[2 * i + 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L146
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:146:35
|
146 | state[i] = poseidon(&[state[2 * i].clone(), state[2 * i + 1].clone()], params);
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state[2 * i]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L126
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:126:20
|
126 | let mut root = leaf.clone();
| ^^^^^^^^^^^^ help: try removing the `clone` call: `leaf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
fawkes-crypto/src/native/poseidon.rs#L106
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> fawkes-crypto/src/native/poseidon.rs:106:30
|
106 | state.iter_mut().zip(c.into_iter()).for_each(|(l, r)| *l+=*r);
| ^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `c`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
this expression borrows a value the compiler would automatically borrow:
fawkes-crypto/src/native/poseidon.rs#L96
warning: this expression borrows a value the compiler would automatically borrow
--> fawkes-crypto/src/native/poseidon.rs:96:5
|
96 | (&mut state[0..n_inputs]).clone_from_slice(inputs);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `state[0..n_inputs]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the loop variable `j` is only used to index `state`:
fawkes-crypto/src/native/poseidon.rs#L78
warning: the loop variable `j` is only used to index `state`
--> fawkes-crypto/src/native/poseidon.rs:78:22
|
78 | for j in 0..params.t {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
78 | for <item> in state.iter_mut().take(params.t) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `j` is used to index `state`:
fawkes-crypto/src/native/poseidon.rs#L64
warning: the loop variable `j` is used to index `state`
--> fawkes-crypto/src/native/poseidon.rs:64:18
|
64 | for j in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
64 | for (j, <item>) in state.iter().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `new_state`:
fawkes-crypto/src/native/poseidon.rs#L63
warning: the loop variable `i` is used to index `new_state`
--> fawkes-crypto/src/native/poseidon.rs:63:14
|
63 | for i in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
63 | for (i, <item>) in new_state.iter_mut().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
using `clone` on type `EdwardsPointEx<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/ecc.rs#L276
warning: using `clone` on type `EdwardsPointEx<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/ecc.rs:276:21
|
276 | let mut p = self.clone();
| ^^^^^^^^^^^^ help: try dereferencing it: `*self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
manual `RangeInclusive::contains` implementation:
/home/runner/work/fawkes-crypto/fawkes-crypto/ff-uint/src/uint/mod.rs#L371
warning: manual `RangeInclusive::contains` implementation
--> fawkes-crypto/src/engines/mod.rs:10:1
|
10 | / construct_uint! {
11 | | struct _U384(6);
12 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: this warning originates in the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
|
manual `RangeInclusive::contains` implementation:
/home/runner/work/fawkes-crypto/fawkes-crypto/ff-uint/src/uint/mod.rs#L371
warning: manual `RangeInclusive::contains` implementation
--> fawkes-crypto/src/engines/mod.rs:6:1
|
6 | / construct_uint! {
7 | | struct _U256(4);
8 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
= note: this warning originates in the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you should consider adding a `Default` implementation for `JubJubBN256`:
fawkes-crypto/src/engines/bn256/mod.rs#L49
warning: you should consider adding a `Default` implementation for `JubJubBN256`
--> fawkes-crypto/src/engines/bn256/mod.rs:49:5
|
49 | / pub fn new() -> Self {
50 | | let edwards_d = -Num::from(168696) / Num::from(168700);
51 | |
52 | | let montgomery_a = Num::from(2) * (Num::ONE - edwards_d) / (Num::ONE + edwards_d);
... |
70 | | }
71 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
48 + impl Default for JubJubBN256 {
49 + fn default() -> Self {
50 + Self::new()
51 + }
52 + }
|
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bn256/mod.rs#L28
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bn256/mod.rs:28:1
|
28 | / construct_primefield_params! {
29 | | pub struct Fs(super::U256);
30 | |
31 | | impl PrimeFieldParams for Fs {
... |
35 | | }
36 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bn256/mod.rs#L18
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bn256/mod.rs:18:1
|
18 | / construct_primefield_params! {
19 | | pub struct Fr(super::U256);
20 | |
21 | | impl PrimeFieldParams for Fr {
... |
25 | | }
26 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bn256/mod.rs#L8
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bn256/mod.rs:8:1
|
8 | / construct_primefield_params! {
9 | | pub struct Fq(super::U256);
10 | |
11 | | impl PrimeFieldParams for Fq {
... |
15 | | }
16 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you should consider adding a `Default` implementation for `JubJubBLS12_381`:
fawkes-crypto/src/engines/bls12_381/mod.rs#L49
warning: you should consider adding a `Default` implementation for `JubJubBLS12_381`
--> fawkes-crypto/src/engines/bls12_381/mod.rs:49:5
|
49 | / pub fn new() -> Self {
50 | | let edwards_d = -Num::from(10240) / Num::from(10241);
51 | |
52 | | let montgomery_a = Num::from(2) * (Num::ONE - edwards_d) / (Num::ONE + edwards_d);
... |
70 | | }
71 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
48 + impl Default for JubJubBLS12_381 {
49 + fn default() -> Self {
50 + Self::new()
51 + }
52 + }
|
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bls12_381/mod.rs#L28
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bls12_381/mod.rs:28:1
|
28 | / construct_primefield_params! {
29 | | pub struct Fs(super::U256);
30 | |
31 | | impl PrimeFieldParams for Fs {
... |
35 | | }
36 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bls12_381/mod.rs#L18
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bls12_381/mod.rs:18:1
|
18 | / construct_primefield_params! {
19 | | pub struct Fr(super::U256);
20 | |
21 | | impl PrimeFieldParams for Fr {
... |
25 | | }
26 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (12/7):
fawkes-crypto/src/engines/bls12_381/mod.rs#L8
warning: this function has too many arguments (12/7)
--> fawkes-crypto/src/engines/bls12_381/mod.rs:8:1
|
8 | / construct_primefield_params! {
9 | | pub struct Fq(super::U384);
10 | |
11 | | impl PrimeFieldParams for Fq {
... |
15 | | }
16 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this expression borrows a value the compiler would automatically borrow:
fawkes-crypto/src/core/sizedvec.rs#L84
warning: this expression borrows a value the compiler would automatically borrow
--> fawkes-crypto/src/core/sizedvec.rs:84:27
|
84 | SizedVec(unsafe { (&*(&MaybeUninit::new(data) as *const _ as *const MaybeUninit<_>)).assume_init_read() })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*(&MaybeUninit::new(data) as *const _ as *const MaybeUninit<_>))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the loop variable `i` is only used to index `data`:
fawkes-crypto/src/core/sizedvec.rs#L78
warning: the loop variable `i` is only used to index `data`
--> fawkes-crypto/src/core/sizedvec.rs:78:18
|
78 | for i in 0..L {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
78 | for <item> in data.iter_mut().take(L) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
fawkes-crypto/src/circuit/poseidon.rs#L76
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> fawkes-crypto/src/circuit/poseidon.rs:76:30
|
76 | state.iter_mut().zip(c.into_iter()).for_each(|(l, r)| *l+=r);
| ^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `c`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression borrows a value the compiler would automatically borrow:
fawkes-crypto/src/circuit/poseidon.rs#L64
warning: this expression borrows a value the compiler would automatically borrow
--> fawkes-crypto/src/circuit/poseidon.rs:64:5
|
64 | (&mut state[0..n_inputs]).clone_from_slice(inputs);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `state[0..n_inputs]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the loop variable `j` is only used to index `state`:
fawkes-crypto/src/circuit/poseidon.rs#L45
warning: the loop variable `j` is only used to index `state`
--> fawkes-crypto/src/circuit/poseidon.rs:45:22
|
45 | for j in 0..params.t {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
45 | for <item> in state.iter_mut().take(params.t) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `j` is used to index `state`:
fawkes-crypto/src/circuit/poseidon.rs#L31
warning: the loop variable `j` is used to index `state`
--> fawkes-crypto/src/circuit/poseidon.rs:31:18
|
31 | for j in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
31 | for (j, <item>) in state.iter().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `new_state`:
fawkes-crypto/src/circuit/poseidon.rs#L30
warning: the loop variable `i` is used to index `new_state`
--> fawkes-crypto/src/circuit/poseidon.rs:30:14
|
30 | for i in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
30 | for (i, <item>) in new_state.iter_mut().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is only used to index `c`:
fawkes-crypto/src/circuit/mux.rs#L17
warning: the loop variable `i` is only used to index `c`
--> fawkes-crypto/src/circuit/mux.rs:17:14
|
17 | for i in 0..c.len() {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
17 | for <item> in &c {
| ~~~~~~ ~~
|
the loop variable `i` is only used to index `c`:
fawkes-crypto/src/circuit/mux.rs#L10
warning: the loop variable `i` is only used to index `c`
--> fawkes-crypto/src/circuit/mux.rs:10:14
|
10 | for i in 0..c.len() {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
10 | for <item> in &c {
| ~~~~~~ ~~
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/eddsaposeidon.rs#L39
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/eddsaposeidon.rs:39:33
|
39 | let s_bits = c_into_bits_le(&s, Num::<J::Fs>::MODULUS_BITS as usize);
| ^^ help: change this to: `s`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
needlessly taken reference of right operand:
fawkes-crypto/src/circuit/ecc.rs#L269
warning: needlessly taken reference of right operand
--> fawkes-crypto/src/circuit/ecc.rs:269:16
|
269 | x: &b_l2 - &a - &self.x - &p.x,
| ^^^^^^^^--
| |
| help: use the right value directly: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
needlessly taken reference of right operand:
fawkes-crypto/src/circuit/ecc.rs#L257
warning: needlessly taken reference of right operand
--> fawkes-crypto/src/circuit/ecc.rs:257:16
|
257 | x: &b_l2 - &a - Num::from(2) * &self.x,
| ^^^^^^^^--
| |
| help: use the right value directly: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/ecc.rs#L236
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/ecc.rs:236:44
|
236 | let (_, y3) = check_and_get_y(&x3, &t, params);
| ^^ help: change this to: `t`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/ecc.rs#L235
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/ecc.rs:235:51
|
235 | let (is_valid, y2) = check_and_get_y(&x2, &t, params);
| ^^ help: change this to: `t`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/ecc.rs#L102
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/ecc.rs:102:27
|
102 | q = q.add(&p, params);
| ^^ help: change this to: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
using `clone` on type `EdwardsPointEx<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/ecc.rs#L97
warning: using `clone` on type `EdwardsPointEx<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/ecc.rs:97:25
|
97 | let mut q = p.clone();
| ^^^^^^^^^ help: try dereferencing it: `*p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `EdwardsPoint<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/ecc.rs#L72
warning: using `clone` on type `EdwardsPoint<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/ecc.rs:72:28
|
72 | .unwrap_or(params.edwards_g().clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*params.edwards_g()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
the loop variable `i` is only used to index `bits`:
fawkes-crypto/src/circuit/bitify.rs#L118
warning: the loop variable `i` is only used to index `bits`
--> fawkes-crypto/src/circuit/bitify.rs:118:14
|
118 | for i in 1..bits.len() {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
118 | for <item> in bits.iter().skip(1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~
|
length comparison to zero:
fawkes-crypto/src/circuit/bitify.rs#L115
warning: length comparison to zero
--> fawkes-crypto/src/circuit/bitify.rs:115:13
|
115 | assert!(bits.len() > 0, "should be positive number of bits");
| ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bits.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
|
manual implementation of an assign operation:
fawkes-crypto/src/circuit/bitify.rs#L99
warning: manual implementation of an assign operation
--> fawkes-crypto/src/circuit/bitify.rs:99:9
|
99 | acc = acc + k;
| ^^^^^^^^^^^^^ help: replace it with: `acc += k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
fawkes-crypto/src/circuit/bitify.rs#L87
warning: manual implementation of an assign operation
--> fawkes-crypto/src/circuit/bitify.rs:87:13
|
87 | / acc = acc
88 | | + k * match (ct_l, ct_u) {
89 | | (false, false) => &sig_l + &sig_u - sig_lu,
90 | | (true, false) => &sig_l + &sig_u * Num::from(2) - sig_lu - Num::ONE,
91 | | (false, true) => sig_lu + &sig_u - Num::ONE,
92 | | (true, true) => sig_lu - Num::ONE,
93 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
help: replace it with
|
87 ~ acc += k * match (ct_l, ct_u) {
88 + (false, false) => &sig_l + &sig_u - sig_lu,
89 + (true, false) => &sig_l + &sig_u * Num::from(2) - sig_lu - Num::ONE,
90 + (false, true) => sig_lu + &sig_u - Num::ONE,
91 + (true, true) => sig_lu - Num::ONE,
92 ~ };
|
|
redundant closure:
fawkes-crypto/src/circuit/bitify.rs#L33
warning: redundant closure
--> fawkes-crypto/src/circuit/bitify.rs:33:48
|
33 | Some(v) => v.bit_iter_le().map(|x| Some(x)).collect::<Vec<_>>(),
| ^^^^^^^^^^^ help: replace the closure with the function itself: `Some`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
the loop variable `i` is only used to index `value_bits`:
fawkes-crypto/src/circuit/bitify.rs#L16
warning: the loop variable `i` is only used to index `value_bits`
--> fawkes-crypto/src/circuit/bitify.rs:16:22
|
16 | for i in 0..limit {
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
16 | for <item> in value_bits.iter().take(limit) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/bitify.rs#L14
warning: using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/bitify.rs:14:38
|
14 | let mut remained_value = value.clone();
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
length comparison to zero:
fawkes-crypto/src/circuit/r1cs/lc.rs#L70
warning: length comparison to zero
--> fawkes-crypto/src/circuit/r1cs/lc.rs:70:12
|
70 | if self.0.len() == 0 {
| ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.0.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L264
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:264:40
|
264 | let value = self.value.map(|a| other.value.map(|b| a * b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a * b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L221
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:221:33
|
221 | self.value = self.value.map(|a| other.value.map(|b| a - b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a - b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L206
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:206:33
|
206 | self.value = self.value.map(|a| other.value.map(|b| a + b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a + b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/r1cs/num.rs#L137
warning: using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/r1cs/num.rs:137:21
|
137 | let value = value.clone();
| ^^^^^^^^^^^^^ help: try dereferencing it: `*value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/r1cs/num.rs#L129
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/r1cs/num.rs:129:22
|
129 | CS::inputize(&self);
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/circuit/r1cs/num.rs#L74
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/circuit/r1cs/num.rs:74:21
|
74 | let ref res_signal = -inv_signal * self + Num::ONE;
| ----^^^^^^^^^^^^^^--------------------------------- help: try: `let res_signal = &(-inv_signal * self + Num::ONE);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L41
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:41:40
|
41 | let value = self.value.map(|a| other.value.map(|b| a / b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a / b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/r1cs/num.rs#L32
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/r1cs/num.rs:32:42
|
32 | let bits = c_into_bits_le_strict(&self);
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
fawkes-crypto/src/circuit/r1cs/cs.rs#L155
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> fawkes-crypto/src/circuit/r1cs/cs.rs:155:9
|
155 | / match (a.value, b.value, c.value) {
156 | | (Some(a), Some(b), Some(c)) => {
157 | | assert!(a * b == c, "Not satisfied constraint");
158 | | },
159 | | _ => {}
160 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
155 ~ if let (Some(a), Some(b), Some(c)) = (a.value, b.value, c.value) {
156 + assert!(a * b == c, "Not satisfied constraint");
157 + }
|
|
you should consider adding a `Default` implementation for `BuildCS<Fr>`:
fawkes-crypto/src/circuit/r1cs/cs.rs#L84
warning: you should consider adding a `Default` implementation for `BuildCS<Fr>`
--> fawkes-crypto/src/circuit/r1cs/cs.rs:84:5
|
84 | / pub fn new() -> Self {
85 | | Self {
86 | | num_input: 1,
87 | | num_aux: 0,
... |
90 | | }
91 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
83 + impl<Fr: PrimeField> Default for BuildCS<Fr> {
84 + fn default() -> Self {
85 + Self::new()
86 + }
87 + }
|
|
you should consider adding a `Default` implementation for `DebugCS<Fr>`:
fawkes-crypto/src/circuit/r1cs/cs.rs#L61
warning: you should consider adding a `Default` implementation for `DebugCS<Fr>`
--> fawkes-crypto/src/circuit/r1cs/cs.rs:61:5
|
61 | / pub fn new() -> Self {
62 | | Self {
63 | | num_input: 1,
64 | | num_aux: 0,
... |
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
60 + impl<Fr: PrimeField> Default for DebugCS<Fr> {
61 + fn default() -> Self {
62 + Self::new()
63 + }
64 + }
|
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/bool.rs#L94
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/bool.rs:94:14
|
94 | .map(|a| other.get_value().map(|b| a == b))
| ______________^
95 | | .flatten();
| |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.get_value().map(|b| a == b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/setup.rs#L19
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/setup.rs:19:9
|
19 | let ref mut rng = OsRng::new();
| ----^^^^^^^^^^^---------------- help: try: `let rng = &mut OsRng::new();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/setup.rs#L10
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/setup.rs:10:9
|
10 | let ref rcs = BuildCS::rc_new();
| ----^^^^^^^--------------------- help: try: `let rcs = &BuildCS::rc_new();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/prover.rs#L78
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/prover.rs:78:9
|
78 | let ref mut rng = OsRng::new();
| ----^^^^^^^^^^^---------------- help: try: `let rng = &mut OsRng::new();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/prover.rs#L69
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/prover.rs:69:9
|
69 | let ref rcs = params.get_witness_rcs();
| ----^^^^^^^---------------------------- help: try: `let rcs = ¶ms.get_witness_rcs();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
= note: `#[warn(clippy::toplevel_ref_arg)]` on by default
|
you should consider adding a `Default` implementation for `OsRng`:
fawkes-crypto/src/backend/bellman_groth16/osrng.rs#L7
warning: you should consider adding a `Default` implementation for `OsRng`
--> fawkes-crypto/src/backend/bellman_groth16/osrng.rs:7:5
|
7 | / pub fn new() -> Self {
8 | | Self {}
9 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
6 + impl Default for OsRng {
7 + fn default() -> Self {
8 + Self::new()
9 + }
10+ }
|
|
constants have by default a `'static` lifetime:
fawkes-crypto/src/constants.rs#L2
warning: constants have by default a `'static` lifetime
--> fawkes-crypto/src/constants.rs:2:28
|
2 | pub const SEED_EDWARDS_G: &'static [u8] = b"edwards_g";
| -^^^^^^^----- help: consider removing `'static`: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
fawkes-crypto/src/constants.rs#L1
warning: constants have by default a `'static` lifetime
--> fawkes-crypto/src/constants.rs:1:29
|
1 | pub const PERSONALIZATION: &'static [u8; 8] = b"__fawkes";
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L627
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:627:37
|
627 | let montgomery_impl = mont_impl(&cratename, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L626
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:626:34
|
626 | let multiply_impl = mul_impl(&cratename, quote! {self}, quote! {other}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L625
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:625:34
|
625 | let squaring_impl = sqr_impl(&cratename, quote! {self}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
redundant closure:
ff-uint_derive/src/lib.rs#L614
warning: redundant closure
--> ff-uint_derive/src/lib.rs:614:34
|
614 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
ff-uint_derive/src/lib.rs#L567
warning: redundant closure
--> ff-uint_derive/src/lib.rs:567:34
|
567 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L161
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:161:41
|
161 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
redundant closure:
fawkes-crypto_derive/src/lib.rs#L109
warning: redundant closure
--> fawkes-crypto_derive/src/lib.rs:109:14
|
109 | .map(|i| syn::Index::from(i))
| ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `syn::Index::from`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L107
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:107:41
|
107 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L244
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:244:9
|
244 | t = t >> 1;
| ^^^^^^^^^^ help: replace it with: `t >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L178
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:178:9
|
178 | v = v >> 1;
| ^^^^^^^^^^ help: replace it with: `v >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L156
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:156:9
|
156 | v = v >> 64;
| ^^^^^^^^^^^ help: replace it with: `v >>= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
unneeded `return` statement:
ff-uint_derive/src/lib.rs#L141
warning: unneeded `return` statement
--> ff-uint_derive/src/lib.rs:141:15
|
141 | }) => return s.value(),
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
141 | }) => s.value(),
| ~~~~~~~~~
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L87
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:87:13
|
87 | cur = cur << 64;
| ^^^^^^^^^^^^^^^ help: replace it with: `cur <<= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L161
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:161:41
|
161 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
redundant closure:
fawkes-crypto_derive/src/lib.rs#L109
warning: redundant closure
--> fawkes-crypto_derive/src/lib.rs:109:14
|
109 | .map(|i| syn::Index::from(i))
| ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `syn::Index::from`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L107
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:107:41
|
107 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
ff-uint/src/num/mod.rs#L297
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> ff-uint/src/num/mod.rs:297:13
|
297 | / match Num::from_mont_uint(NumRepr(n)) {
298 | | Some(n) => return n,
299 | | _ => {}
300 | | }
| |_____________^ help: try: `if let Some(n) = Num::from_mont_uint(NumRepr(n)) { return n }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
|
unused import: `uint::macros::*`:
ff-uint/src/lib.rs#L50
warning: unused import: `uint::macros::*`
--> ff-uint/src/lib.rs:50:9
|
50 | pub use uint::macros::*;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
private item shadows public glob re-export:
ff-uint/src/lib.rs#L37
warning: private item shadows public glob re-export
--> ff-uint/src/lib.rs:37:1
|
37 | mod traits;
| ^^^^^^^^^^^
|
note: the name `traits` in the type namespace is supposed to be publicly re-exported here
--> ff-uint/src/lib.rs:48:9
|
48 | pub use ff::*;
| ^^^^^
note: but the private item here shadows it
--> ff-uint/src/lib.rs:37:1
|
37 | mod traits;
| ^^^^^^^^^^^
= note: `#[warn(hidden_glob_reexports)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L627
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:627:37
|
627 | let montgomery_impl = mont_impl(&cratename, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L626
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:626:34
|
626 | let multiply_impl = mul_impl(&cratename, quote! {self}, quote! {other}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L625
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:625:34
|
625 | let squaring_impl = sqr_impl(&cratename, quote! {self}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
redundant closure:
ff-uint_derive/src/lib.rs#L614
warning: redundant closure
--> ff-uint_derive/src/lib.rs:614:34
|
614 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
ff-uint_derive/src/lib.rs#L567
warning: redundant closure
--> ff-uint_derive/src/lib.rs:567:34
|
567 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L244
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:244:9
|
244 | t = t >> 1;
| ^^^^^^^^^^ help: replace it with: `t >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L178
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:178:9
|
178 | v = v >> 1;
| ^^^^^^^^^^ help: replace it with: `v >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L156
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:156:9
|
156 | v = v >> 64;
| ^^^^^^^^^^^ help: replace it with: `v >>= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
unneeded `return` statement:
ff-uint_derive/src/lib.rs#L141
warning: unneeded `return` statement
--> ff-uint_derive/src/lib.rs:141:15
|
141 | }) => return s.value(),
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
141 | }) => s.value(),
| ~~~~~~~~~
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L87
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:87:13
|
87 | cur = cur << 64;
| ^^^^^^^^^^^^^^^ help: replace it with: `cur <<= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
seedbox/src/lib.rs#L13
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> seedbox/src/lib.rs:13:24
|
13 | res.iter_mut().zip(hasher.finalize().into_iter()).for_each(|(l,r)| *l=r);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `hasher.finalize()`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
constants have by default a `'static` lifetime:
seedbox/src/lib.rs#L7
warning: constants have by default a `'static` lifetime
--> seedbox/src/lib.rs:7:29
|
7 | pub const PERSONALIZATION: &'static [u8; 8] = b"__fawkes";
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L149
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:149:5
|
149 | state[0].clone()
| ^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state[0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L146
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:146:57
|
146 | state[i] = poseidon(&[state[2 * i].clone(), state[2 * i + 1].clone()], params);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state[2 * i + 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L146
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:146:35
|
146 | state[i] = poseidon(&[state[2 * i].clone(), state[2 * i + 1].clone()], params);
| ^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `state[2 * i]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `Num<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/poseidon.rs#L126
warning: using `clone` on type `Num<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/poseidon.rs:126:20
|
126 | let mut root = leaf.clone();
| ^^^^^^^^^^^^ help: try removing the `clone` call: `leaf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
fawkes-crypto/src/native/poseidon.rs#L106
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> fawkes-crypto/src/native/poseidon.rs:106:30
|
106 | state.iter_mut().zip(c.into_iter()).for_each(|(l, r)| *l+=*r);
| ^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `c`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
|
this expression borrows a value the compiler would automatically borrow:
fawkes-crypto/src/native/poseidon.rs#L96
warning: this expression borrows a value the compiler would automatically borrow
--> fawkes-crypto/src/native/poseidon.rs:96:5
|
96 | (&mut state[0..n_inputs]).clone_from_slice(inputs);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `state[0..n_inputs]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the loop variable `j` is only used to index `state`:
fawkes-crypto/src/native/poseidon.rs#L78
warning: the loop variable `j` is only used to index `state`
--> fawkes-crypto/src/native/poseidon.rs:78:22
|
78 | for j in 0..params.t {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
78 | for <item> in state.iter_mut().take(params.t) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `j` is used to index `state`:
fawkes-crypto/src/native/poseidon.rs#L64
warning: the loop variable `j` is used to index `state`
--> fawkes-crypto/src/native/poseidon.rs:64:18
|
64 | for j in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
64 | for (j, <item>) in state.iter().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `new_state`:
fawkes-crypto/src/native/poseidon.rs#L63
warning: the loop variable `i` is used to index `new_state`
--> fawkes-crypto/src/native/poseidon.rs:63:14
|
63 | for i in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
63 | for (i, <item>) in new_state.iter_mut().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
using `clone` on type `EdwardsPointEx<Fr>` which implements the `Copy` trait:
fawkes-crypto/src/native/ecc.rs#L276
warning: using `clone` on type `EdwardsPointEx<Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/native/ecc.rs:276:21
|
276 | let mut p = self.clone();
| ^^^^^^^^^^^^ help: try dereferencing it: `*self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
manual `RangeInclusive::contains` implementation:
/home/runner/work/fawkes-crypto/fawkes-crypto/ff-uint/src/uint/mod.rs#L371
warning: manual `RangeInclusive::contains` implementation
--> fawkes-crypto/src/engines/mod.rs:10:1
|
10 | / construct_uint! {
11 | | struct _U384(6);
12 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: this warning originates in the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
|
manual `RangeInclusive::contains` implementation:
/home/runner/work/fawkes-crypto/fawkes-crypto/ff-uint/src/uint/mod.rs#L371
warning: manual `RangeInclusive::contains` implementation
--> fawkes-crypto/src/engines/mod.rs:6:1
|
6 | / construct_uint! {
7 | | struct _U256(4);
8 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains
= note: `#[warn(clippy::manual_range_contains)]` on by default
= note: this warning originates in the macro `construct_uint` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you should consider adding a `Default` implementation for `JubJubBN256`:
fawkes-crypto/src/engines/bn256/mod.rs#L49
warning: you should consider adding a `Default` implementation for `JubJubBN256`
--> fawkes-crypto/src/engines/bn256/mod.rs:49:5
|
49 | / pub fn new() -> Self {
50 | | let edwards_d = -Num::from(168696) / Num::from(168700);
51 | |
52 | | let montgomery_a = Num::from(2) * (Num::ONE - edwards_d) / (Num::ONE + edwards_d);
... |
70 | | }
71 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
48 + impl Default for JubJubBN256 {
49 + fn default() -> Self {
50 + Self::new()
51 + }
52 + }
|
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bn256/mod.rs#L28
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bn256/mod.rs:28:1
|
28 | / construct_primefield_params! {
29 | | pub struct Fs(super::U256);
30 | |
31 | | impl PrimeFieldParams for Fs {
... |
35 | | }
36 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bn256/mod.rs#L18
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bn256/mod.rs:18:1
|
18 | / construct_primefield_params! {
19 | | pub struct Fr(super::U256);
20 | |
21 | | impl PrimeFieldParams for Fr {
... |
25 | | }
26 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bn256/mod.rs#L8
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bn256/mod.rs:8:1
|
8 | / construct_primefield_params! {
9 | | pub struct Fq(super::U256);
10 | |
11 | | impl PrimeFieldParams for Fq {
... |
15 | | }
16 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
you should consider adding a `Default` implementation for `JubJubBLS12_381`:
fawkes-crypto/src/engines/bls12_381/mod.rs#L49
warning: you should consider adding a `Default` implementation for `JubJubBLS12_381`
--> fawkes-crypto/src/engines/bls12_381/mod.rs:49:5
|
49 | / pub fn new() -> Self {
50 | | let edwards_d = -Num::from(10240) / Num::from(10241);
51 | |
52 | | let montgomery_a = Num::from(2) * (Num::ONE - edwards_d) / (Num::ONE + edwards_d);
... |
70 | | }
71 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
48 + impl Default for JubJubBLS12_381 {
49 + fn default() -> Self {
50 + Self::new()
51 + }
52 + }
|
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bls12_381/mod.rs#L28
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bls12_381/mod.rs:28:1
|
28 | / construct_primefield_params! {
29 | | pub struct Fs(super::U256);
30 | |
31 | | impl PrimeFieldParams for Fs {
... |
35 | | }
36 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (8/7):
fawkes-crypto/src/engines/bls12_381/mod.rs#L18
warning: this function has too many arguments (8/7)
--> fawkes-crypto/src/engines/bls12_381/mod.rs:18:1
|
18 | / construct_primefield_params! {
19 | | pub struct Fr(super::U256);
20 | |
21 | | impl PrimeFieldParams for Fr {
... |
25 | | }
26 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this function has too many arguments (12/7):
fawkes-crypto/src/engines/bls12_381/mod.rs#L8
warning: this function has too many arguments (12/7)
--> fawkes-crypto/src/engines/bls12_381/mod.rs:8:1
|
8 | / construct_primefield_params! {
9 | | pub struct Fq(super::U384);
10 | |
11 | | impl PrimeFieldParams for Fq {
... |
15 | | }
16 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
= note: this warning originates in the macro `construct_primefield_params` (in Nightly builds, run with -Z macro-backtrace for more info)
|
this expression borrows a value the compiler would automatically borrow:
fawkes-crypto/src/core/sizedvec.rs#L84
warning: this expression borrows a value the compiler would automatically borrow
--> fawkes-crypto/src/core/sizedvec.rs:84:27
|
84 | SizedVec(unsafe { (&*(&MaybeUninit::new(data) as *const _ as *const MaybeUninit<_>)).assume_init_read() })
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `(*(&MaybeUninit::new(data) as *const _ as *const MaybeUninit<_>))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the loop variable `i` is only used to index `data`:
fawkes-crypto/src/core/sizedvec.rs#L78
warning: the loop variable `i` is only used to index `data`
--> fawkes-crypto/src/core/sizedvec.rs:78:18
|
78 | for i in 0..L {
| ^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
78 | for <item> in data.iter_mut().take(L) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
fawkes-crypto/src/circuit/poseidon.rs#L76
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> fawkes-crypto/src/circuit/poseidon.rs:76:30
|
76 | state.iter_mut().zip(c.into_iter()).for_each(|(l, r)| *l+=r);
| ^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `c`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression borrows a value the compiler would automatically borrow:
fawkes-crypto/src/circuit/poseidon.rs#L64
warning: this expression borrows a value the compiler would automatically borrow
--> fawkes-crypto/src/circuit/poseidon.rs:64:5
|
64 | (&mut state[0..n_inputs]).clone_from_slice(inputs);
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `state[0..n_inputs]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the loop variable `j` is only used to index `state`:
fawkes-crypto/src/circuit/poseidon.rs#L45
warning: the loop variable `j` is only used to index `state`
--> fawkes-crypto/src/circuit/poseidon.rs:45:22
|
45 | for j in 0..params.t {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
45 | for <item> in state.iter_mut().take(params.t) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `j` is used to index `state`:
fawkes-crypto/src/circuit/poseidon.rs#L31
warning: the loop variable `j` is used to index `state`
--> fawkes-crypto/src/circuit/poseidon.rs:31:18
|
31 | for j in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
31 | for (j, <item>) in state.iter().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is used to index `new_state`:
fawkes-crypto/src/circuit/poseidon.rs#L30
warning: the loop variable `i` is used to index `new_state`
--> fawkes-crypto/src/circuit/poseidon.rs:30:14
|
30 | for i in 0..statelen {
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator and enumerate()
|
30 | for (i, <item>) in new_state.iter_mut().enumerate().take(statelen) {
| ~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
the loop variable `i` is only used to index `c`:
fawkes-crypto/src/circuit/mux.rs#L17
warning: the loop variable `i` is only used to index `c`
--> fawkes-crypto/src/circuit/mux.rs:17:14
|
17 | for i in 0..c.len() {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
17 | for <item> in &c {
| ~~~~~~ ~~
|
the loop variable `i` is only used to index `c`:
fawkes-crypto/src/circuit/mux.rs#L10
warning: the loop variable `i` is only used to index `c`
--> fawkes-crypto/src/circuit/mux.rs:10:14
|
10 | for i in 0..c.len() {
| ^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
10 | for <item> in &c {
| ~~~~~~ ~~
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/eddsaposeidon.rs#L39
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/eddsaposeidon.rs:39:33
|
39 | let s_bits = c_into_bits_le(&s, Num::<J::Fs>::MODULUS_BITS as usize);
| ^^ help: change this to: `s`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
needlessly taken reference of right operand:
fawkes-crypto/src/circuit/ecc.rs#L269
warning: needlessly taken reference of right operand
--> fawkes-crypto/src/circuit/ecc.rs:269:16
|
269 | x: &b_l2 - &a - &self.x - &p.x,
| ^^^^^^^^--
| |
| help: use the right value directly: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
|
needlessly taken reference of right operand:
fawkes-crypto/src/circuit/ecc.rs#L257
warning: needlessly taken reference of right operand
--> fawkes-crypto/src/circuit/ecc.rs:257:16
|
257 | x: &b_l2 - &a - Num::from(2) * &self.x,
| ^^^^^^^^--
| |
| help: use the right value directly: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/ecc.rs#L236
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/ecc.rs:236:44
|
236 | let (_, y3) = check_and_get_y(&x3, &t, params);
| ^^ help: change this to: `t`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/ecc.rs#L235
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/ecc.rs:235:51
|
235 | let (is_valid, y2) = check_and_get_y(&x2, &t, params);
| ^^ help: change this to: `t`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/ecc.rs#L102
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/ecc.rs:102:27
|
102 | q = q.add(&p, params);
| ^^ help: change this to: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
using `clone` on type `EdwardsPointEx<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/ecc.rs#L97
warning: using `clone` on type `EdwardsPointEx<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/ecc.rs:97:25
|
97 | let mut q = p.clone();
| ^^^^^^^^^ help: try dereferencing it: `*p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `EdwardsPoint<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/ecc.rs#L72
warning: using `clone` on type `EdwardsPoint<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/ecc.rs:72:28
|
72 | .unwrap_or(params.edwards_g().clone())
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*params.edwards_g()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
the loop variable `i` is only used to index `bits`:
fawkes-crypto/src/circuit/bitify.rs#L118
warning: the loop variable `i` is only used to index `bits`
--> fawkes-crypto/src/circuit/bitify.rs:118:14
|
118 | for i in 1..bits.len() {
| ^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
help: consider using an iterator
|
118 | for <item> in bits.iter().skip(1) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~
|
length comparison to zero:
fawkes-crypto/src/circuit/bitify.rs#L115
warning: length comparison to zero
--> fawkes-crypto/src/circuit/bitify.rs:115:13
|
115 | assert!(bits.len() > 0, "should be positive number of bits");
| ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!bits.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
|
manual implementation of an assign operation:
fawkes-crypto/src/circuit/bitify.rs#L99
warning: manual implementation of an assign operation
--> fawkes-crypto/src/circuit/bitify.rs:99:9
|
99 | acc = acc + k;
| ^^^^^^^^^^^^^ help: replace it with: `acc += k`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
fawkes-crypto/src/circuit/bitify.rs#L87
warning: manual implementation of an assign operation
--> fawkes-crypto/src/circuit/bitify.rs:87:13
|
87 | / acc = acc
88 | | + k * match (ct_l, ct_u) {
89 | | (false, false) => &sig_l + &sig_u - sig_lu,
90 | | (true, false) => &sig_l + &sig_u * Num::from(2) - sig_lu - Num::ONE,
91 | | (false, true) => sig_lu + &sig_u - Num::ONE,
92 | | (true, true) => sig_lu - Num::ONE,
93 | | };
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
help: replace it with
|
87 ~ acc += k * match (ct_l, ct_u) {
88 + (false, false) => &sig_l + &sig_u - sig_lu,
89 + (true, false) => &sig_l + &sig_u * Num::from(2) - sig_lu - Num::ONE,
90 + (false, true) => sig_lu + &sig_u - Num::ONE,
91 + (true, true) => sig_lu - Num::ONE,
92 ~ };
|
|
redundant closure:
fawkes-crypto/src/circuit/bitify.rs#L33
warning: redundant closure
--> fawkes-crypto/src/circuit/bitify.rs:33:48
|
33 | Some(v) => v.bit_iter_le().map(|x| Some(x)).collect::<Vec<_>>(),
| ^^^^^^^^^^^ help: replace the closure with the function itself: `Some`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
the loop variable `i` is only used to index `value_bits`:
fawkes-crypto/src/circuit/bitify.rs#L16
warning: the loop variable `i` is only used to index `value_bits`
--> fawkes-crypto/src/circuit/bitify.rs:16:22
|
16 | for i in 0..limit {
| ^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop
= note: `#[warn(clippy::needless_range_loop)]` on by default
help: consider using an iterator
|
16 | for <item> in value_bits.iter().take(limit) {
| ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/bitify.rs#L14
warning: using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/bitify.rs:14:38
|
14 | let mut remained_value = value.clone();
| ^^^^^^^^^^^^^ help: try removing the `clone` call: `value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
length comparison to zero:
fawkes-crypto/src/circuit/r1cs/lc.rs#L70
warning: length comparison to zero
--> fawkes-crypto/src/circuit/r1cs/lc.rs:70:12
|
70 | if self.0.len() == 0 {
| ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.0.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L264
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:264:40
|
264 | let value = self.value.map(|a| other.value.map(|b| a * b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a * b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L221
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:221:33
|
221 | self.value = self.value.map(|a| other.value.map(|b| a - b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a - b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L206
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:206:33
|
206 | self.value = self.value.map(|a| other.value.map(|b| a + b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a + b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait:
fawkes-crypto/src/circuit/r1cs/num.rs#L137
warning: using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait
--> fawkes-crypto/src/circuit/r1cs/num.rs:137:21
|
137 | let value = value.clone();
| ^^^^^^^^^^^^^ help: try dereferencing it: `*value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/r1cs/num.rs#L129
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/r1cs/num.rs:129:22
|
129 | CS::inputize(&self);
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/circuit/r1cs/num.rs#L74
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/circuit/r1cs/num.rs:74:21
|
74 | let ref res_signal = -inv_signal * self + Num::ONE;
| ----^^^^^^^^^^^^^^--------------------------------- help: try: `let res_signal = &(-inv_signal * self + Num::ONE);`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/num.rs#L41
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/num.rs:41:40
|
41 | let value = self.value.map(|a| other.value.map(|b| a / b)).flatten();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.value.map(|b| a / b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto/src/circuit/r1cs/num.rs#L32
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto/src/circuit/r1cs/num.rs:32:42
|
32 | let bits = c_into_bits_le_strict(&self);
| ^^^^^ help: change this to: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
fawkes-crypto/src/circuit/r1cs/cs.rs#L155
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> fawkes-crypto/src/circuit/r1cs/cs.rs:155:9
|
155 | / match (a.value, b.value, c.value) {
156 | | (Some(a), Some(b), Some(c)) => {
157 | | assert!(a * b == c, "Not satisfied constraint");
158 | | },
159 | | _ => {}
160 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
help: try
|
155 ~ if let (Some(a), Some(b), Some(c)) = (a.value, b.value, c.value) {
156 + assert!(a * b == c, "Not satisfied constraint");
157 + }
|
|
you should consider adding a `Default` implementation for `BuildCS<Fr>`:
fawkes-crypto/src/circuit/r1cs/cs.rs#L84
warning: you should consider adding a `Default` implementation for `BuildCS<Fr>`
--> fawkes-crypto/src/circuit/r1cs/cs.rs:84:5
|
84 | / pub fn new() -> Self {
85 | | Self {
86 | | num_input: 1,
87 | | num_aux: 0,
... |
90 | | }
91 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
83 + impl<Fr: PrimeField> Default for BuildCS<Fr> {
84 + fn default() -> Self {
85 + Self::new()
86 + }
87 + }
|
|
you should consider adding a `Default` implementation for `DebugCS<Fr>`:
fawkes-crypto/src/circuit/r1cs/cs.rs#L61
warning: you should consider adding a `Default` implementation for `DebugCS<Fr>`
--> fawkes-crypto/src/circuit/r1cs/cs.rs:61:5
|
61 | / pub fn new() -> Self {
62 | | Self {
63 | | num_input: 1,
64 | | num_aux: 0,
... |
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
help: try adding this
|
60 + impl<Fr: PrimeField> Default for DebugCS<Fr> {
61 + fn default() -> Self {
62 + Self::new()
63 + }
64 + }
|
|
called `map(..).flatten()` on `Option`:
fawkes-crypto/src/circuit/r1cs/bool.rs#L94
warning: called `map(..).flatten()` on `Option`
--> fawkes-crypto/src/circuit/r1cs/bool.rs:94:14
|
94 | .map(|a| other.get_value().map(|b| a == b))
| ______________^
95 | | .flatten();
| |______________________^ help: try replacing `map` with `and_then` and remove the `.flatten()`: `and_then(|a| other.get_value().map(|b| a == b))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/setup.rs#L19
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/setup.rs:19:9
|
19 | let ref mut rng = OsRng::new();
| ----^^^^^^^^^^^---------------- help: try: `let rng = &mut OsRng::new();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/setup.rs#L10
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/setup.rs:10:9
|
10 | let ref rcs = BuildCS::rc_new();
| ----^^^^^^^--------------------- help: try: `let rcs = &BuildCS::rc_new();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/prover.rs#L78
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/prover.rs:78:9
|
78 | let ref mut rng = OsRng::new();
| ----^^^^^^^^^^^---------------- help: try: `let rng = &mut OsRng::new();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
|
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead:
fawkes-crypto/src/backend/bellman_groth16/prover.rs#L69
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead
--> fawkes-crypto/src/backend/bellman_groth16/prover.rs:69:9
|
69 | let ref rcs = params.get_witness_rcs();
| ----^^^^^^^---------------------------- help: try: `let rcs = ¶ms.get_witness_rcs();`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
= note: `#[warn(clippy::toplevel_ref_arg)]` on by default
|
you should consider adding a `Default` implementation for `OsRng`:
fawkes-crypto/src/backend/bellman_groth16/osrng.rs#L7
warning: you should consider adding a `Default` implementation for `OsRng`
--> fawkes-crypto/src/backend/bellman_groth16/osrng.rs:7:5
|
7 | / pub fn new() -> Self {
8 | | Self {}
9 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
6 + impl Default for OsRng {
7 + fn default() -> Self {
8 + Self::new()
9 + }
10+ }
|
|
constants have by default a `'static` lifetime:
fawkes-crypto/src/constants.rs#L2
warning: constants have by default a `'static` lifetime
--> fawkes-crypto/src/constants.rs:2:28
|
2 | pub const SEED_EDWARDS_G: &'static [u8] = b"edwards_g";
| -^^^^^^^----- help: consider removing `'static`: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
|
constants have by default a `'static` lifetime:
fawkes-crypto/src/constants.rs#L1
warning: constants have by default a `'static` lifetime
--> fawkes-crypto/src/constants.rs:1:29
|
1 | pub const PERSONALIZATION: &'static [u8; 8] = b"__fawkes";
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L627
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:627:37
|
627 | let montgomery_impl = mont_impl(&cratename, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L626
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:626:34
|
626 | let multiply_impl = mul_impl(&cratename, quote! {self}, quote! {other}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L625
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:625:34
|
625 | let squaring_impl = sqr_impl(&cratename, quote! {self}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
redundant closure:
ff-uint_derive/src/lib.rs#L614
warning: redundant closure
--> ff-uint_derive/src/lib.rs:614:34
|
614 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
ff-uint_derive/src/lib.rs#L567
warning: redundant closure
--> ff-uint_derive/src/lib.rs:567:34
|
567 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L161
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:161:41
|
161 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
redundant closure:
fawkes-crypto_derive/src/lib.rs#L109
warning: redundant closure
--> fawkes-crypto_derive/src/lib.rs:109:14
|
109 | .map(|i| syn::Index::from(i))
| ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `syn::Index::from`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L107
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:107:41
|
107 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L244
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:244:9
|
244 | t = t >> 1;
| ^^^^^^^^^^ help: replace it with: `t >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L178
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:178:9
|
178 | v = v >> 1;
| ^^^^^^^^^^ help: replace it with: `v >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L156
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:156:9
|
156 | v = v >> 64;
| ^^^^^^^^^^^ help: replace it with: `v >>= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
unneeded `return` statement:
ff-uint_derive/src/lib.rs#L141
warning: unneeded `return` statement
--> ff-uint_derive/src/lib.rs:141:15
|
141 | }) => return s.value(),
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
141 | }) => s.value(),
| ~~~~~~~~~
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L87
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:87:13
|
87 | cur = cur << 64;
| ^^^^^^^^^^^^^^^ help: replace it with: `cur <<= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L161
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:161:41
|
161 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
redundant closure:
fawkes-crypto_derive/src/lib.rs#L109
warning: redundant closure
--> fawkes-crypto_derive/src/lib.rs:109:14
|
109 | .map(|i| syn::Index::from(i))
| ^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `syn::Index::from`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
fawkes-crypto_derive/src/lib.rs#L107
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> fawkes-crypto_derive/src/lib.rs:107:41
|
107 | let var_typenames = get_field_types(&fields);
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`:
ff-uint/src/num/mod.rs#L297
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`
--> ff-uint/src/num/mod.rs:297:13
|
297 | / match Num::from_mont_uint(NumRepr(n)) {
298 | | Some(n) => return n,
299 | | _ => {}
300 | | }
| |_____________^ help: try: `if let Some(n) = Num::from_mont_uint(NumRepr(n)) { return n }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match
= note: `#[warn(clippy::single_match)]` on by default
|
unused import: `uint::macros::*`:
ff-uint/src/lib.rs#L50
warning: unused import: `uint::macros::*`
--> ff-uint/src/lib.rs:50:9
|
50 | pub use uint::macros::*;
| ^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
private item shadows public glob re-export:
ff-uint/src/lib.rs#L37
warning: private item shadows public glob re-export
--> ff-uint/src/lib.rs:37:1
|
37 | mod traits;
| ^^^^^^^^^^^
|
note: the name `traits` in the type namespace is supposed to be publicly re-exported here
--> ff-uint/src/lib.rs:48:9
|
48 | pub use ff::*;
| ^^^^^
note: but the private item here shadows it
--> ff-uint/src/lib.rs:37:1
|
37 | mod traits;
| ^^^^^^^^^^^
= note: `#[warn(hidden_glob_reexports)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L627
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:627:37
|
627 | let montgomery_impl = mont_impl(&cratename, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L626
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:626:34
|
626 | let multiply_impl = mul_impl(&cratename, quote! {self}, quote! {other}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
ff-uint_derive/src/lib.rs#L625
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> ff-uint_derive/src/lib.rs:625:34
|
625 | let squaring_impl = sqr_impl(&cratename, quote! {self}, limbs);
| ^^^^^^^^^^ help: change this to: `cratename`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
redundant closure:
ff-uint_derive/src/lib.rs#L614
warning: redundant closure
--> ff-uint_derive/src/lib.rs:614:34
|
614 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
ff-uint_derive/src/lib.rs#L567
warning: redundant closure
--> ff-uint_derive/src/lib.rs:567:34
|
567 | (0..(limbs * 2)).map(|i| get_temp(i)),
| ^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `get_temp`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L244
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:244:9
|
244 | t = t >> 1;
| ^^^^^^^^^^ help: replace it with: `t >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L178
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:178:9
|
178 | v = v >> 1;
| ^^^^^^^^^^ help: replace it with: `v >>= 1`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L156
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:156:9
|
156 | v = v >> 64;
| ^^^^^^^^^^^ help: replace it with: `v >>= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
|
unneeded `return` statement:
ff-uint_derive/src/lib.rs#L141
warning: unneeded `return` statement
--> ff-uint_derive/src/lib.rs:141:15
|
141 | }) => return s.value(),
| ^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
141 | }) => s.value(),
| ~~~~~~~~~
|
manual implementation of an assign operation:
ff-uint_derive/src/lib.rs#L87
warning: manual implementation of an assign operation
--> ff-uint_derive/src/lib.rs:87:13
|
87 | cur = cur << 64;
| ^^^^^^^^^^^^^^^ help: replace it with: `cur <<= 64`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern
= note: `#[warn(clippy::assign_op_pattern)]` on by default
|
explicit call to `.into_iter()` in function argument accepting `IntoIterator`:
seedbox/src/lib.rs#L13
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator`
--> seedbox/src/lib.rs:13:24
|
13 | res.iter_mut().zip(hasher.finalize().into_iter()).for_each(|(l,r)| *l=r);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `hasher.finalize()`
|
note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()`
--> /rustc/82e1608dfa6e0b5569232559e3d385fea5a93112/library/core/src/iter/traits/iterator.rs:643:12
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
constants have by default a `'static` lifetime:
seedbox/src/lib.rs#L7
warning: constants have by default a `'static` lifetime
--> seedbox/src/lib.rs:7:29
|
7 | pub const PERSONALIZATION: &'static [u8; 8] = b"__fawkes";
| -^^^^^^^-------- help: consider removing `'static`: `&[u8; 8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
|
check_and_test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
check_and_test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
check_and_test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
check_and_test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
check_and_test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
check_and_test
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|