Skip to content

Merge pull request #253 from alan-turing-institute/252-rpc #581

Merge pull request #253 from alan-turing-institute/252-rpc

Merge pull request #253 from alan-turing-institute/252-rpc #581

Triggered via push March 7, 2026 10:54
Status Success
Total duration 2m 28s
Artifacts

rust.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

28 warnings
large size difference between variants: crates/trustchain-http/src/verifier.rs#L37
warning: large size difference between variants --> crates/trustchain-http/src/verifier.rs:37:1 | 37 | / pub enum PresentationOrCredential { 38 | | Presentation(Presentation), | | -------------------------- the largest variant contains at least 1592 bytes 39 | | Credential(Credential), | | ---------------------- the second-largest variant contains at least 1064 bytes 40 | | } | |_^ the entire enum is at least 1592 bytes | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#large_enum_variant = note: `#[warn(clippy::large_enum_variant)]` on by default help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum | 38 - Presentation(Presentation), 38 + Presentation(Box<Presentation>), |
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestor.rs#L377
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestor.rs:377:57 | 377 | fn verify_nonce(payload: JwtPayload, path: &PathBuf) -> Result<(), TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestor.rs#L335
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestor.rs:335:6 | 335 | ) -> Result<IdentityCRChallenge, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L909
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:909:54 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 909 | pub fn attestation_request_basepath(prefix: &str) -> Result<PathBuf, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L901
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:901:61 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 901 | pub fn attestation_request_path(key: &JWK, prefix: &str) -> Result<PathBuf, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L877
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:877:6 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 877 | ) -> Result<String, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L721
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:721:38 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 721 | pub fn check_cr_status(&self) -> Result<CurrentCRState, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L304
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:304:33 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 304 | pub fn temp_s_key(&self) -> Result<&Jwk, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L299
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:299:33 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 299 | pub fn temp_p_key(&self) -> Result<&Jwk, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L224
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:224:59 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 224 | fn save_to_file(&self, path: &PathBuf, data: &str) -> Result<(), TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L220
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:220:57 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 220 | fn elementwise_deserialize(self, path: &PathBuf) -> Result<Option<Self>, TrustchainCRError> | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: crates/trustchain-http/src/attestation_utils.rs#L220
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> crates/trustchain-http/src/attestation_utils.rs:220:44 | 220 | fn elementwise_deserialize(self, path: &PathBuf) -> Result<Option<Self>, TrustchainCRError> | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#ptr_arg
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do: crates/trustchain-http/src/attestation_utils.rs#L206
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do --> crates/trustchain-http/src/attestation_utils.rs:206:43 | 206 | fn elementwise_serialize(&self, path: &PathBuf) -> Result<(), TrustchainCRError> { | ^^^^^^^^ help: change this to: `&Path` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#ptr_arg = note: `#[warn(clippy::ptr_arg)]` on by default
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_utils.rs#L206
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_utils.rs:206:56 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes ... 206 | fn elementwise_serialize(&self, path: &PathBuf) -> Result<(), TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_encryption_utils.rs#L108
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_encryption_utils.rs:108:6 | 108 | ) -> Result<HashMap<String, Jwk>, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_encryption_utils.rs#L74
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_encryption_utils.rs:74:10 | 74 | ) -> Result<JwtPayload, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_encryption_utils.rs#L58
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_encryption_utils.rs:58:59 | 58 | fn decrypt(&self, value: &Value, secret_key: &Jwk) -> Result<JwtPayload, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_encryption_utils.rs#L48
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_encryption_utils.rs:48:10 | 48 | ) -> Result<String, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_encryption_utils.rs#L32
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_encryption_utils.rs:32:66 | 32 | fn encrypt(&self, payload: &JwtPayload, public_key: &Jwk) -> Result<String, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err
the `Err`-variant returned from this function is very large: crates/trustchain-http/src/attestation_encryption_utils.rs#L22
warning: the `Err`-variant returned from this function is very large --> crates/trustchain-http/src/attestation_encryption_utils.rs:22:63 | 22 | fn sign(&self, payload: &JwtPayload, secret_key: &Jwk) -> Result<String, TrustchainCRError> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ::: crates/trustchain-http/src/attestation_utils.rs:98:5 | 98 | FailedToRespond(reqwest::Response), | ---------------------------------- the largest variant contains at least 152 bytes | = help: try reducing the size of `attestation_utils::TrustchainCRError`, for example by boxing large elements or replacing it with `Box<attestation_utils::TrustchainCRError>` = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#result_large_err = note: `#[warn(clippy::result_large_err)]` on by default
the `e @ _` pattern can be written as just `e`: crates/trustchain-api/src/errors.rs#L238
warning: the `e @ _` pattern can be written as just `e` --> crates/trustchain-api/src/errors.rs:238:13 | 238 | ref e @ _ => { | ^^^^^^^^^ help: try: `ref e` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#redundant_pattern = note: `#[warn(clippy::redundant_pattern)]` on by default
you should use the `ends_with` method: crates/trustchain-ion/src/lib.rs#L69
warning: you should use the `ends_with` method --> crates/trustchain-ion/src/lib.rs:69:8 | 69 | if sidetree_api_url.chars().last().unwrap() != '/' { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: like this: `!sidetree_api_url.ends_with('/')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#chars_last_cmp = note: `#[warn(clippy::chars_last_cmp)]` on by default
length comparison to zero: crates/trustchain-ion/src/lib.rs#L63
warning: length comparison to zero --> crates/trustchain-ion/src/lib.rs:63:8 | 63 | if sidetree_api_url.len() == 0 { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `sidetree_api_url.is_empty()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#len_zero = note: `#[warn(clippy::len_zero)]` on by default
the `network @ _` pattern can be written as just `network`: crates/trustchain-ion/src/lib.rs#L229
warning: the `network @ _` pattern can be written as just `network` --> crates/trustchain-ion/src/lib.rs:229:9 | 229 | network @ _ => { | ^^^^^^^^^^^ help: try: `network` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#redundant_pattern
the `network @ _` pattern can be written as just `network`: crates/trustchain-ion/src/utils.rs#L114
warning: the `network @ _` pattern can be written as just `network` --> crates/trustchain-ion/src/utils.rs:114:13 | 114 | network @ _ => { | ^^^^^^^^^^^ help: try: `network` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#redundant_pattern
the `network @ _` pattern can be written as just `network`: crates/trustchain-ion/src/utils.rs#L97
warning: the `network @ _` pattern can be written as just `network` --> crates/trustchain-ion/src/utils.rs:97:13 | 97 | network @ _ => { | ^^^^^^^^^^^ help: try: `network` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#redundant_pattern
the `network @ _` pattern can be written as just `network`: crates/trustchain-ion/src/utils.rs#L80
warning: the `network @ _` pattern can be written as just `network` --> crates/trustchain-ion/src/utils.rs:80:13 | 80 | network @ _ => { | ^^^^^^^^^^^ help: try: `network` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#redundant_pattern = note: `#[warn(clippy::redundant_pattern)]` on by default
called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator: crates/trustchain-core/src/utils.rs#L67
warning: called `Iterator::last` on a `DoubleEndedIterator`; this will needlessly iterate the entire iterator --> crates/trustchain-core/src/utils.rs:67:5 | 67 | did.split(':').last().unwrap() | ^^^^^^^^^^^^^^^------ | | | help: try: `next_back()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.93.0/index.html#double_ended_iterator_last = note: `#[warn(clippy::double_ended_iterator_last)]` on by default