Skip to content

Add write and read methods to Parameters #137

Add write and read methods to Parameters

Add write and read methods to Parameters #137

Triggered via push December 26, 2023 18:19
Status Success
Total duration 1m 33s
Artifacts
Fit to window
Zoom out
Zoom in

Annotations

200 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/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:642: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 = note: `#[warn(clippy::new_without_default)]` on by 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: 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/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:642: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 = note: `#[warn(clippy::len_zero)]` on by default
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
suspicious use of `*` in `Div` impl: fawkes-crypto/src/circuit/plonk/num.rs#L407
warning: suspicious use of `*` in `Div` impl --> fawkes-crypto/src/circuit/plonk/num.rs:407:21 | 407 | other.inv() * self | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl = note: `#[warn(clippy::suspicious_arithmetic_impl)]` on by default
called `map(..).flatten()` on `Option`: fawkes-crypto/src/circuit/plonk/num.rs#L285
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:285:36 | 285 | 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/plonk/num.rs#L216
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:216:36 | 216 | 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/plonk/num.rs#L211
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:211:35 | 211 | 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/plonk/num.rs#L126
warning: using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait --> fawkes-crypto/src/circuit/plonk/num.rs:126:21 | 126 | 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/plonk/num.rs#L118
warning: this expression creates a reference which is immediately dereferenced by the compiler --> fawkes-crypto/src/circuit/plonk/num.rs:118:22 | 118 | 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
called `map(..).flatten()` on `Option`: fawkes-crypto/src/circuit/plonk/num.rs#L40
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:40:40 | 40 | 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/plonk/num.rs#L31
warning: this expression creates a reference which is immediately dereferenced by the compiler --> fawkes-crypto/src/circuit/plonk/num.rs:31:42 | 31 | 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/plonk/cs.rs#L137
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> fawkes-crypto/src/circuit/plonk/cs.rs:137:13 | 137 | / match (x.value, y.value, z.value) { 138 | | (Some(x), Some(y), Some(z)) => { 139 | | assert!(x + y == z, "Not satisfied constraint"); 140 | | } 141 | | _ => {} 142 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match help: try | 137 ~ if let (Some(x), Some(y), Some(z)) = (x.value, y.value, z.value) { 138 + assert!(x + y == z, "Not satisfied constraint"); 139 + } |
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: fawkes-crypto/src/circuit/plonk/cs.rs#L115
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> fawkes-crypto/src/circuit/plonk/cs.rs:115:13 | 115 | / match (x.value, y.value, z.value) { 116 | | (Some(x), Some(y), Some(z)) => { 117 | | assert!(x * y == z, "Not satisfied constraint"); 118 | | } 119 | | _ => {} 120 | | } | |_____________^ | = 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 | 115 ~ if let (Some(x), Some(y), Some(z)) = (x.value, y.value, z.value) { 116 + assert!(x * y == z, "Not satisfied constraint"); 117 + } |
suspicious use of `*` in `BitAndAssign` impl: fawkes-crypto/src/circuit/plonk/bool.rs#L131
warning: suspicious use of `*` in `BitAndAssign` impl --> fawkes-crypto/src/circuit/plonk/bool.rs:131:32 | 131 | *self = (self.to_num() * other.to_num()).to_bool_unchecked() | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_op_assign_impl = note: `#[warn(clippy::suspicious_op_assign_impl)]` on by default
called `map(..).flatten()` on `Option`: fawkes-crypto/src/circuit/plonk/bool.rs#L106
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/bool.rs:106:14 | 106 | .map(|a| other.get_value().map(|b| a == b)) | ______________^ 107 | | .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
casting to the same type is unnecessary (`usize` -> `usize`): fawkes-crypto/src/backend/plonk/mod.rs#L166
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> fawkes-crypto/src/backend/plonk/mod.rs:166:27 | 166 | var_cells[public_indexes[i] as usize] = Some(Halo2Cell::Input(i)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `public_indexes[i]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
useless use of `format!`: fawkes-crypto/src/backend/plonk/mod.rs#L161
warning: useless use of `format!` --> fawkes-crypto/src/backend/plonk/mod.rs:161:35 | 161 | layouter.assign_region(|| format!("syntesize circuit"), |mut region| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"syntesize circuit".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
this function has too many arguments (8/7): fawkes-crypto/src/backend/plonk/mod.rs#L103
warning: this function has too many arguments (8/7) --> fawkes-crypto/src/backend/plonk/mod.rs:103:1 | 103 | / fn assign_advice_ex< 104 | | Fr:PrimeField, 105 | | F:HaloPrimeField, 106 | | AnR: Into<String>, ... | 116 | | val: Val 117 | | ) -> Result<(), Error> { | |______________________^ | = 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
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead: fawkes-crypto/src/backend/plonk/setup.rs#L38
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead --> fawkes-crypto/src/backend/plonk/setup.rs:38:9 | 38 | let ref rcs = Rc::new(RefCell::new(cs)); | ----^^^^^^^----------------------------- help: try: `let rcs = &Rc::new(RefCell::new(cs));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
the following explicit lifetimes could be elided: 'a: fawkes-crypto/src/backend/plonk/setup.rs#L29
warning: the following explicit lifetimes could be elided: 'a --> fawkes-crypto/src/backend/plonk/setup.rs:29:5 | 29 | 'a, | ^^ ... 34 | params: &'a Parameters<Bn256>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 29 ~ Pub: Signal<BuildCS<Fr>>, 30 | Sec: Signal<BuildCS<Fr>>, 31 | C: Fn(Pub, Sec) 32 | >( 33 ~ params: &Parameters<Bn256>, |
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead: fawkes-crypto/src/backend/plonk/prover.rs#L56
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead --> fawkes-crypto/src/backend/plonk/prover.rs:56:9 | 56 | let ref rcs = Rc::new(RefCell::new(cs)); | ----^^^^^^^----------------------------- help: try: `let rcs = &Rc::new(RefCell::new(cs));` | = 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
unused import: `EncodedChallenge`: fawkes-crypto/src/backend/plonk/prover.rs#L19
warning: unused import: `EncodedChallenge` --> fawkes-crypto/src/backend/plonk/prover.rs:19:18 | 19 | transcript::{EncodedChallenge, TranscriptReadBuffer, TranscriptWriterBuffer} | ^^^^^^^^^^^^^^^^
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
unused import: `MultiMillerLoop`: fawkes-crypto/src/backend/plonk/prover.rs#L30
warning: unused import: `MultiMillerLoop` --> fawkes-crypto/src/backend/plonk/prover.rs:30:29 | 30 | use halo2_curves::pairing::{MultiMillerLoop}; | ^^^^^^^^^^^^^^^
unused import: `Cursor`: fawkes-crypto/src/backend/plonk/prover.rs#L25
warning: unused import: `Cursor` --> fawkes-crypto/src/backend/plonk/prover.rs:25:10 | 25 | io::{Cursor}, | ^^^^^^
unused imports: `Circuit`, `ParamsKZG`, `ProvingKey as PlonkProvingKey`, `TranscriptReadBuffer`: fawkes-crypto/src/backend/plonk/prover.rs#L11
warning: unused imports: `Circuit`, `ParamsKZG`, `ProvingKey as PlonkProvingKey`, `TranscriptReadBuffer` --> fawkes-crypto/src/backend/plonk/prover.rs:11:22 | 11 | create_proof,Circuit, ProvingKey as PlonkProvingKey, | ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 15 | commitment::{KZGCommitmentScheme, ParamsKZG}, | ^^^^^^^^^ ... 19 | transcript::{EncodedChallenge, TranscriptReadBuffer, TranscriptWriterBuffer} | ^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` 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
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
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
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
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/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:642: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
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
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/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:642: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 = note: `#[warn(clippy::new_without_default)]` on by 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: 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/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:642: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 `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 = note: `#[warn(clippy::len_zero)]` on by default
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
suspicious use of `*` in `Div` impl: fawkes-crypto/src/circuit/plonk/num.rs#L407
warning: suspicious use of `*` in `Div` impl --> fawkes-crypto/src/circuit/plonk/num.rs:407:21 | 407 | other.inv() * self | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_arithmetic_impl = note: `#[warn(clippy::suspicious_arithmetic_impl)]` on by default
called `map(..).flatten()` on `Option`: fawkes-crypto/src/circuit/plonk/num.rs#L285
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:285:36 | 285 | 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/plonk/num.rs#L216
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:216:36 | 216 | 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/plonk/num.rs#L211
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:211:35 | 211 | 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/plonk/num.rs#L126
warning: using `clone` on type `Num<<C as CS>::Fr>` which implements the `Copy` trait --> fawkes-crypto/src/circuit/plonk/num.rs:126:21 | 126 | 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/plonk/num.rs#L118
warning: this expression creates a reference which is immediately dereferenced by the compiler --> fawkes-crypto/src/circuit/plonk/num.rs:118:22 | 118 | 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
called `map(..).flatten()` on `Option`: fawkes-crypto/src/circuit/plonk/num.rs#L40
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/num.rs:40:40 | 40 | 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/plonk/num.rs#L31
warning: this expression creates a reference which is immediately dereferenced by the compiler --> fawkes-crypto/src/circuit/plonk/num.rs:31:42 | 31 | 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/plonk/cs.rs#L137
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> fawkes-crypto/src/circuit/plonk/cs.rs:137:13 | 137 | / match (x.value, y.value, z.value) { 138 | | (Some(x), Some(y), Some(z)) => { 139 | | assert!(x + y == z, "Not satisfied constraint"); 140 | | } 141 | | _ => {} 142 | | } | |_____________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match help: try | 137 ~ if let (Some(x), Some(y), Some(z)) = (x.value, y.value, z.value) { 138 + assert!(x + y == z, "Not satisfied constraint"); 139 + } |
you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`: fawkes-crypto/src/circuit/plonk/cs.rs#L115
warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` --> fawkes-crypto/src/circuit/plonk/cs.rs:115:13 | 115 | / match (x.value, y.value, z.value) { 116 | | (Some(x), Some(y), Some(z)) => { 117 | | assert!(x * y == z, "Not satisfied constraint"); 118 | | } 119 | | _ => {} 120 | | } | |_____________^ | = 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 | 115 ~ if let (Some(x), Some(y), Some(z)) = (x.value, y.value, z.value) { 116 + assert!(x * y == z, "Not satisfied constraint"); 117 + } |
suspicious use of `*` in `BitAndAssign` impl: fawkes-crypto/src/circuit/plonk/bool.rs#L131
warning: suspicious use of `*` in `BitAndAssign` impl --> fawkes-crypto/src/circuit/plonk/bool.rs:131:32 | 131 | *self = (self.to_num() * other.to_num()).to_bool_unchecked() | ^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_op_assign_impl = note: `#[warn(clippy::suspicious_op_assign_impl)]` on by default
called `map(..).flatten()` on `Option`: fawkes-crypto/src/circuit/plonk/bool.rs#L106
warning: called `map(..).flatten()` on `Option` --> fawkes-crypto/src/circuit/plonk/bool.rs:106:14 | 106 | .map(|a| other.get_value().map(|b| a == b)) | ______________^ 107 | | .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
casting to the same type is unnecessary (`usize` -> `usize`): fawkes-crypto/src/backend/plonk/mod.rs#L166
warning: casting to the same type is unnecessary (`usize` -> `usize`) --> fawkes-crypto/src/backend/plonk/mod.rs:166:27 | 166 | var_cells[public_indexes[i] as usize] = Some(Halo2Cell::Input(i)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `public_indexes[i]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
useless use of `format!`: fawkes-crypto/src/backend/plonk/mod.rs#L161
warning: useless use of `format!` --> fawkes-crypto/src/backend/plonk/mod.rs:161:35 | 161 | layouter.assign_region(|| format!("syntesize circuit"), |mut region| { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"syntesize circuit".to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
this function has too many arguments (8/7): fawkes-crypto/src/backend/plonk/mod.rs#L103
warning: this function has too many arguments (8/7) --> fawkes-crypto/src/backend/plonk/mod.rs:103:1 | 103 | / fn assign_advice_ex< 104 | | Fr:PrimeField, 105 | | F:HaloPrimeField, 106 | | AnR: Into<String>, ... | 116 | | val: Val 117 | | ) -> Result<(), Error> { | |______________________^ | = 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
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead: fawkes-crypto/src/backend/plonk/setup.rs#L38
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead --> fawkes-crypto/src/backend/plonk/setup.rs:38:9 | 38 | let ref rcs = Rc::new(RefCell::new(cs)); | ----^^^^^^^----------------------------- help: try: `let rcs = &Rc::new(RefCell::new(cs));` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg
the following explicit lifetimes could be elided: 'a: fawkes-crypto/src/backend/plonk/setup.rs#L29
warning: the following explicit lifetimes could be elided: 'a --> fawkes-crypto/src/backend/plonk/setup.rs:29:5 | 29 | 'a, | ^^ ... 34 | params: &'a Parameters<Bn256>, | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 29 ~ Pub: Signal<BuildCS<Fr>>, 30 | Sec: Signal<BuildCS<Fr>>, 31 | C: Fn(Pub, Sec) 32 | >( 33 ~ params: &Parameters<Bn256>, |
`ref` on an entire `let` pattern is discouraged, take a reference with `&` instead: fawkes-crypto/src/backend/plonk/prover.rs#L56
warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead --> fawkes-crypto/src/backend/plonk/prover.rs:56:9 | 56 | let ref rcs = Rc::new(RefCell::new(cs)); | ----^^^^^^^----------------------------- help: try: `let rcs = &Rc::new(RefCell::new(cs));` | = 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
unused import: `EncodedChallenge`: fawkes-crypto/src/backend/plonk/prover.rs#L19
warning: unused import: `EncodedChallenge` --> fawkes-crypto/src/backend/plonk/prover.rs:19:18 | 19 | transcript::{EncodedChallenge, TranscriptReadBuffer, TranscriptWriterBuffer} | ^^^^^^^^^^^^^^^^
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
unused import: `MultiMillerLoop`: fawkes-crypto/src/backend/plonk/prover.rs#L30
warning: unused import: `MultiMillerLoop` --> fawkes-crypto/src/backend/plonk/prover.rs:30:29 | 30 | use halo2_curves::pairing::{MultiMillerLoop}; | ^^^^^^^^^^^^^^^
unused import: `Cursor`: fawkes-crypto/src/backend/plonk/prover.rs#L25
warning: unused import: `Cursor` --> fawkes-crypto/src/backend/plonk/prover.rs:25:10 | 25 | io::{Cursor}, | ^^^^^^
unused imports: `Circuit`, `ParamsKZG`, `ProvingKey as PlonkProvingKey`, `TranscriptReadBuffer`: fawkes-crypto/src/backend/plonk/prover.rs#L11
warning: unused imports: `Circuit`, `ParamsKZG`, `ProvingKey as PlonkProvingKey`, `TranscriptReadBuffer` --> fawkes-crypto/src/backend/plonk/prover.rs:11:22 | 11 | create_proof,Circuit, ProvingKey as PlonkProvingKey, | ^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 15 | commitment::{KZGCommitmentScheme, ParamsKZG}, | ^^^^^^^^^ ... 19 | transcript::{EncodedChallenge, TranscriptReadBuffer, TranscriptWriterBuffer} | ^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` 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
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
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
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
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/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:642: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
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
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/