Skip to content

DID resolution including >1kB keys #399

DID resolution including >1kB keys

DID resolution including >1kB keys #399

Triggered via pull request November 17, 2023 11:59
Status Failure
Total duration 4m 12s
Artifacts

rust.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

1 error and 9 warnings
rustfmt
Process completed with exit code 1.
`if` chain can be rewritten with `match`: trustchain-ion/src/utils.rs#L371
warning: `if` chain can be rewritten with `match` --> trustchain-ion/src/utils.rs:371:9 | 371 | / if current_unixtime as i64 > target_unixtime { 372 | | end_height = current_height; // TODO CHECK: original script has: current_height - 1; 373 | | } else if (current_unixtime as i64) < target_unixtime { 374 | | start_height = current_height; // TODO CHECK: original script has: current_height + 1; 375 | | } | |_________^ | = help: consider rewriting the `if` chain to use `cmp` and `match` = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#comparison_chain = note: `#[warn(clippy::comparison_chain)]` on by default
redundant closure: trustchain-ion/src/utils.rs#L95
warning: redundant closure --> trustchain-ion/src/utils.rs:95:22 | 95 | .map_err(|err| TrustchainIpfsError::Utf8DecodingError(err))?; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TrustchainIpfsError::Utf8DecodingError` | = 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 pattern creates a reference to a reference: trustchain-ion/src/resolver.rs#L268
warning: this pattern creates a reference to a reference --> trustchain-ion/src/resolver.rs:268:22 | 268 | .filter_map(|ref s| { | ^^^^^ help: try: `s` | = 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
derefed type is same as origin: trustchain-ion/src/resolver.rs#L269
warning: derefed type is same as origin --> trustchain-ion/src/resolver.rs:269:16 | 269 | if s.type_ | ________________^ 270 | | .to_single() 271 | | .as_deref() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_option_as_deref = note: `#[warn(clippy::needless_option_as_deref)]` on by default help: try | 269 ~ if s.type_ 270 + .to_single() |
calling `insert_str()` using a single-character string literal: trustchain-ion/src/resolver.rs#L182
warning: calling `insert_str()` using a single-character string literal --> trustchain-ion/src/resolver.rs:182:13 | 182 | new_vm_map.id.insert_str(0, "#"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `insert` with a character literal: `new_vm_map.id.insert(0, '#')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str = note: `#[warn(clippy::single_char_add_str)]` on by default
single-character string constant used as pattern: trustchain-ion/src/resolver.rs#L181
warning: single-character string constant used as pattern --> trustchain-ion/src/resolver.rs:181:39 | 181 | if !new_vm_map.id.starts_with("#") { | ^^^ help: try using a `char` instead: `'#'` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
use of `unwrap_or` to construct default value: trustchain-ion/src/attestor.rs#L166
warning: use of `unwrap_or` to construct default value --> trustchain-ion/src/attestor.rs:166:44 | 166 | &linked_data_proof_options.unwrap_or(LinkedDataProofOptions::default()), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default = note: `#[warn(clippy::unwrap_or_default)]` on by default
single-character string constant used as pattern: trustchain-core/src/resolver.rs#L297
warning: single-character string constant used as pattern --> trustchain-core/src/resolver.rs:297:33 | 297 | .rsplit(":") | ^^^ help: try using a `char` instead: `':'` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on 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/