Skip to content

DID resolution including >1kB keys #396

DID resolution including >1kB keys

DID resolution including >1kB keys #396

Triggered via pull request November 16, 2023 09:14
Status Success
Total duration 4m 4s
Artifacts

rust.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

6 warnings
`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#L195
warning: this pattern creates a reference to a reference --> trustchain-ion/src/resolver.rs:195:22 | 195 | .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#L196
warning: derefed type is same as origin --> trustchain-ion/src/resolver.rs:196:16 | 196 | if s.type_ | ________________^ 197 | | .to_single() 198 | | .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 | 196 ~ if s.type_ 197 + .to_single() |
single-character string constant used as pattern: trustchain-core/src/resolver.rs#L302
warning: single-character string constant used as pattern --> trustchain-core/src/resolver.rs:302:33 | 302 | .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/