Skip to content

Support BBS+ and JWP #4245

Support BBS+ and JWP

Support BBS+ and JWP #4245

Re-run triggered January 26, 2024 12:00
Status Failure
Total duration 51s
Artifacts

clippy.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 2 warnings
redundant field names in struct initialization: identity_jose/src/jwk/jwk_ext.rs#L111
error: redundant field names in struct initialization --> identity_jose/src/jwk/jwk_ext.rs:111:13 | 111 | kty: kty, | ^^^^^^^^ help: replace it with: `kty` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names = note: `-D clippy::redundant-field-names` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::redundant_field_names)]`
redundant field names in struct initialization: identity_jose/src/jwk/jwk_ext.rs#L118
error: redundant field names in struct initialization --> identity_jose/src/jwk/jwk_ext.rs:118:13 | 118 | x5u: x5u, | ^^^^^^^^ help: replace it with: `x5u` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: identity_jose/src/jwk/jwk_ext.rs#L122
error: redundant field names in struct initialization --> identity_jose/src/jwk/jwk_ext.rs:122:13 | 122 | params: params | ^^^^^^^^^^^^^^ help: replace it with: `params` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
redundant field names in struct initialization: identity_jose/src/jwk/jwk_ext.rs#L152
error: redundant field names in struct initialization --> identity_jose/src/jwk/jwk_ext.rs:152:13 | 152 | alg: alg, | ^^^^^^^^ help: replace it with: `alg` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: identity_jose/src/jwk/jwk_ext.rs#L26
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> identity_jose/src/jwk/jwk_ext.rs:26:1 | 26 | impl Into<KeyOps> for JwkOperation { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into = note: `-D clippy::from-over-into` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::from_over_into)]` help: replace the `Into` implementation with `From<jwk::key_operation::JwkOperation>` | 26 ~ impl From<JwkOperation> for KeyOps { 27 ~ fn from(val: JwkOperation) -> Self { 28 ~ match val { 29 ~ JwkOperation::Sign => KeyOps::Sign, 30 ~ JwkOperation::Verify => KeyOps::Verify, 31 ~ JwkOperation::Encrypt => KeyOps::Encrypt, 32 ~ JwkOperation::Decrypt => KeyOps::Decrypt, 33 ~ JwkOperation::WrapKey => KeyOps::WrapKey, 34 ~ JwkOperation::UnwrapKey => KeyOps::UnwrapKey, 35 ~ JwkOperation::DeriveKey => KeyOps::DeriveKey, 36 ~ JwkOperation::DeriveBits => KeyOps::DeriveBits, 37 ~ JwkOperation::ProofGeneration => KeyOps::ProofGeneration, 38 ~ JwkOperation::ProofVerification => KeyOps::ProofVerification, |
an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true: identity_jose/src/jwk/jwk_ext.rs#L54
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true --> identity_jose/src/jwk/jwk_ext.rs:54:1 | 54 | impl Into<PKUse> for JwkUse { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into help: replace the `Into` implementation with `From<jwk::key_use::JwkUse>` | 54 ~ impl From<JwkUse> for PKUse { 55 ~ fn from(val: JwkUse) -> Self { 56 ~ match val { 57 ~ JwkUse::Signature => PKUse::Signature, 58 ~ JwkUse::Encryption => PKUse::Encryption, 59 ~ JwkUse::Proof => PKUse::Proof, |
unneeded `return` statement: identity_jose/src/jwk/jwk_ext.rs#L82
error: unneeded `return` statement --> identity_jose/src/jwk/jwk_ext.rs:82:17 | 82 | return Self::Error::KeyError("Invalid crv!") })?, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `-D clippy::needless-return` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::needless_return)]` help: remove `return` | 82 | Self::Error::KeyError("Invalid crv!") })?, | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
unneeded `return` statement: identity_jose/src/jwk/jwk_ext.rs#L99
error: unneeded `return` statement --> identity_jose/src/jwk/jwk_ext.rs:99:25 | 99 | return Self::Error::InvalidClaim("x5u"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return help: remove `return` | 99 - return Self::Error::InvalidClaim("x5u"); 99 + Self::Error::InvalidClaim("x5u") |
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`: identity_jose/src/jwk/jwk_ext.rs#L112
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` --> identity_jose/src/jwk/jwk_ext.rs:112:19 | 112 | use_: value.pk_use.and_then(|u| Some(JwkUse::from(u))), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `value.pk_use.map(|u| JwkUse::from(u))` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map = note: `-D clippy::bind-instead-of-map` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(clippy::bind_instead_of_map)]`
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`: identity_jose/src/jwk/jwk_ext.rs#L113
error: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` --> identity_jose/src/jwk/jwk_ext.rs:113:22 | 113 | key_ops: value.key_ops.and_then(|vec_key_ops| { | ______________________^ 114 | | Some(vec_key_ops.into_iter().map(JwkOperation::from).collect()) 115 | | }), | |______________^ help: try: `value.key_ops.map(|vec_key_ops| vec_key_ops.into_iter().map(JwkOperation::from).collect())` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
clippy
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9, actions-rs-plus/clippy-check@b09a9c37c9df7db8b1a5d52e8fe8e0b6e3d574c4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
clippy
The following actions uses node12 which is deprecated and will be forced to run on node16: jetli/wasm-bindgen-action@24ba6f9fff570246106ac3f80f35185600c3f6c9. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/