Skip to content

Refactor access to header properties #28

Refactor access to header properties

Refactor access to header properties #28

GitHub Actions / clippy failed Nov 23, 2023 in 0s

clippy

4 errors

Details

Results

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

Versions

  • rustc 1.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check failure on line 256 in src/jose/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

taken reference of right operand

error: taken reference of right operand
   --> src/jose/mod.rs:256:81
    |
256 |                     if let Some(key) = REGISTERED_HEADER_KEYS.iter().find(|&&k| k == &key) {
    |                                                                                 ^^^^^----
    |                                                                                      |
    |                                                                                      help: use the right value directly: `key`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
    = note: `-D clippy::op-ref` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::op_ref)]`

Check failure on line 46 in src/jose/signed.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

error: the borrowed expression implements the required traits
  --> src/jose/signed.rs:46:34
   |
46 |             serde_json::to_value(&self.algorithm).unwrap(),
   |                                  ^^^^^^^^^^^^^^^ help: change this to: `self.algorithm`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args

Check failure on line 41 in src/jose/rendered.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

error: the borrowed expression implements the required traits
  --> src/jose/rendered.rs:41:34
   |
41 |             serde_json::to_value(&self.algorithm).unwrap(),
   |                                  ^^^^^^^^^^^^^^^ help: change this to: `self.algorithm`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
   = note: `-D clippy::needless-borrows-for-generic-args` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::needless_borrows_for_generic_args)]`

Check failure on line 99 in src/jose/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

constants have by default a `'static` lifetime

error: constants have by default a `'static` lifetime
  --> src/jose/mod.rs:99:33
   |
99 | const REGISTERED_HEADER_KEYS: [&'static str; 11] = [
   |                                -^^^^^^^---- help: consider removing `'static`: `&str`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
   = note: `-D clippy::redundant-static-lifetimes` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::redundant_static_lifetimes)]`