Skip to content

Add data credential signing & verification to the CLI #433

Add data credential signing & verification to the CLI

Add data credential signing & verification to the CLI #433

GitHub Actions / clippy succeeded Jul 6, 2024 in 0s

clippy

7 warnings

Details

Results

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

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 338 in trustchain-api/src/api.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

redundant closure

warning: redundant closure
   --> trustchain-api/src/api.rs:338:18
    |
338 |         .map_err(|e| DataCredentialError::CredentialError(e))
    |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `DataCredentialError::CredentialError`
    |
    = 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 331 in trustchain-api/src/api.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
   --> trustchain-api/src/api.rs:331:13
    |
331 |             &credential,
    |             ^^^^^^^^^^^ help: change this to: `credential`
    |
    = 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 473 in trustchain-ion/src/commitment.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

match can be simplified with `.unwrap_or_default()`

warning: match can be simplified with `.unwrap_or_default()`
   --> trustchain-ion/src/commitment.rs:470:25
    |
470 |           let endpoints = match did_doc.get_endpoints() {
    |  _________________________^
471 | |             Some(x) => x,
472 | |             None => vec![],
473 | |         };
    | |_________^ help: replace it with: `did_doc.get_endpoints().unwrap_or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default

Check warning on line 469 in trustchain-ion/src/commitment.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

match can be simplified with `.unwrap_or_default()`

warning: match can be simplified with `.unwrap_or_default()`
   --> trustchain-ion/src/commitment.rs:466:20
    |
466 |           let keys = match did_doc.get_keys() {
    |  ____________________^
467 | |             Some(x) => x,
468 | |             None => vec![],
469 | |         };
    | |_________^ help: replace it with: `did_doc.get_keys().unwrap_or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
    = note: `#[warn(clippy::manual_unwrap_or_default)]` on by default

Check warning on line 334 in trustchain-ion/src/utils.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of deprecated method `chrono::NaiveDateTime::timestamp`: use `.and_utc().timestamp()` instead

warning: use of deprecated method `chrono::NaiveDateTime::timestamp`: use `.and_utc().timestamp()` instead
   --> trustchain-ion/src/utils.rs:334:14
    |
334 |     datetime.timestamp()
    |              ^^^^^^^^^
    |
    = note: `#[warn(deprecated)]` on by default

Check warning on line 65 in trustchain-core/src/graph.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `ToOwned::to_owned()` may be inefficient

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
  --> trustchain-core/src/graph.rs:65:13
   |
65 |             did = ddid.to_owned();
   |             ^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `ddid.clone_into(&mut did)`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
   = note: `#[warn(clippy::assigning_clones)]` on by default

Check warning on line 6 in trustchain-core/src/key_manager.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `std::fmt::format`

warning: unused import: `std::fmt::format`
 --> trustchain-core/src/key_manager.rs:6:5
  |
6 | use std::fmt::format;
  |     ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default