Skip to content

Add data credential signing & verification to the CLI #446

Add data credential signing & verification to the CLI

Add data credential signing & verification to the CLI #446

Triggered via pull request July 12, 2024 14:22
Status Success
Total duration 2m 58s
Artifacts

rust.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

12 warnings
rustfmt
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
redundant closure: trustchain-api/src/api.rs#L338
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
this expression creates a reference which is immediately dereferenced by the compiler: trustchain-api/src/api.rs#L331
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
match can be simplified with `.unwrap_or_default()`: trustchain-ion/src/commitment.rs#L470
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
match can be simplified with `.unwrap_or_default()`: trustchain-ion/src/commitment.rs#L466
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
use of deprecated method `chrono::NaiveDateTime::timestamp`: use `.and_utc().timestamp()` instead: trustchain-ion/src/utils.rs#L334
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
assigning the result of `ToOwned::to_owned()` may be inefficient: trustchain-core/src/graph.rs#L65
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
unused import: `std::fmt::format`: trustchain-core/src/key_manager.rs#L6
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
Docs
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
clippy_check
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
clippy_check
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
build
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/