Skip to content

Implement read/write for ProvingKey and VerifyingKey #143

Implement read/write for ProvingKey and VerifyingKey

Implement read/write for ProvingKey and VerifyingKey #143

GitHub Actions / clippy failed Jan 20, 2024 in 0s

clippy

6 errors, 33 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 6
Warning 33
Note 0
Help 0

Versions

  • rustc 1.75.0 (82e1608df 2023-12-21)
  • cargo 1.75.0 (1d8b05cdd 2023-11-20)
  • clippy 0.1.75 (82e1608 2023-12-21)

Annotations

Check warning on line 2 in fawkes-crypto/src/constants.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

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

Check warning on line 1 in fawkes-crypto/src/constants.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

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

Check failure on line 2 in fawkes-crypto/src/core/signal.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved imports `crate::circuit::bool`, `crate::circuit::cs`

error[E0432]: unresolved imports `crate::circuit::bool`, `crate::circuit::cs`
 --> fawkes-crypto/src/core/signal.rs:2:15
  |
2 |     circuit::{bool::CBool, cs::{CS, RCS}},
  |               ^^^^         ^^ could not find `cs` in `circuit`
  |               |
  |               could not find `bool` in `circuit`

Check failure on line 2 in fawkes-crypto/src/circuit/poseidon.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved imports `crate::circuit::bool`, `crate::circuit::cs`, `crate::circuit::num`

error[E0432]: unresolved imports `crate::circuit::bool`, `crate::circuit::cs`, `crate::circuit::num`
 --> fawkes-crypto/src/circuit/poseidon.rs:2:15
  |
2 |     circuit::{bool::CBool, cs::{CS, RCS}, num::CNum},
  |               ^^^^         ^^             ^^^ could not find `num` in `circuit`
  |               |            |
  |               |            could not find `cs` in `circuit`
  |               could not find `bool` in `circuit`

Check failure on line 2 in fawkes-crypto/src/circuit/mux.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved imports `crate::circuit::bool`, `crate::circuit::num`, `crate::circuit::cs`

error[E0432]: unresolved imports `crate::circuit::bool`, `crate::circuit::num`, `crate::circuit::cs`
 --> fawkes-crypto/src/circuit/mux.rs:2:15
  |
2 |     circuit::{bool::CBool, num::CNum, cs::CS},
  |               ^^^^         ^^^        ^^ could not find `cs` in `circuit`
  |               |            |
  |               |            could not find `num` in `circuit`
  |               could not find `bool` in `circuit`

Check failure on line 4 in fawkes-crypto/src/circuit/eddsaposeidon.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved imports `crate::circuit::bool`, `crate::circuit::num`, `crate::circuit::cs`

error[E0432]: unresolved imports `crate::circuit::bool`, `crate::circuit::num`, `crate::circuit::cs`
 --> fawkes-crypto/src/circuit/eddsaposeidon.rs:4:9
  |
4 |         bool::CBool,
  |         ^^^^ could not find `bool` in `circuit`
5 |         ecc::CEdwardsPoint,
6 |         num::CNum,
  |         ^^^ could not find `num` in `circuit`
7 |         poseidon::c_poseidon,
8 |         cs::CS,
  |         ^^ could not find `cs` in `circuit`

Check failure on line 4 in fawkes-crypto/src/circuit/ecc.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved imports `crate::circuit::bool`, `crate::circuit::cs`, `crate::circuit::num`

error[E0432]: unresolved imports `crate::circuit::bool`, `crate::circuit::cs`, `crate::circuit::num`
 --> fawkes-crypto/src/circuit/ecc.rs:4:15
  |
4 |     circuit::{bool::CBool, cs::{CS, RCS}, mux::c_mux3, num::CNum},
  |               ^^^^         ^^                          ^^^ could not find `num` in `circuit`
  |               |            |
  |               |            could not find `cs` in `circuit`
  |               could not find `bool` in `circuit`

Check failure on line 4 in fawkes-crypto/src/circuit/bitify.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unresolved imports `crate::circuit::bool`, `crate::circuit::num`, `crate::circuit::cs`

error[E0432]: unresolved imports `crate::circuit::bool`, `crate::circuit::num`, `crate::circuit::cs`
 --> fawkes-crypto/src/circuit/bitify.rs:4:15
  |
4 |     circuit::{bool::CBool, num::CNum, cs::CS},
  |               ^^^^         ^^^        ^^ could not find `cs` in `circuit`
  |               |            |
  |               |            could not find `num` in `circuit`
  |               could not find `bool` in `circuit`

Check warning on line 161 in fawkes-crypto_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 109 in fawkes-crypto_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

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

Check warning on line 107 in fawkes-crypto_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 627 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 626 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 625 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 614 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

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

Check warning on line 567 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

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

Check warning on line 244 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

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

Check warning on line 178 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

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

Check warning on line 156 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

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

Check warning on line 141 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unneeded `return` statement

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(),
    |               ~~~~~~~~~

Check warning on line 87 in ff-uint_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

manual implementation of an assign operation

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 warning on line 161 in fawkes-crypto_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 109 in fawkes-crypto_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

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

Check warning on line 107 in fawkes-crypto_derive/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

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

Check warning on line 300 in ff-uint/src/num/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let`

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