Merge pull request #214 from alan-turing-institute/206-cli-status #35
Annotations
25 warnings
|
large size difference between variants:
crates/trustchain-http/src/verifier.rs#L88
warning: large size difference between variants
--> crates/trustchain-http/src/verifier.rs:88:1
|
88 | / pub enum PresentationOrCredential {
89 | | Presentation(Presentation),
| | -------------------------- the largest variant contains at least 1592 bytes
90 | | Credential(Credential),
| | ---------------------- the second-largest variant contains at least 1064 bytes
91 | | }
| |_^ 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
|
89 - Presentation(Presentation),
89 + Presentation(Box<Presentation>),
|
|
|
the `Err`-variant returned from this function is very large:
crates/trustchain-http/src/attestor.rs#L404
warning: the `Err`-variant returned from this function is very large
--> crates/trustchain-http/src/attestor.rs:404:57
|
404 | 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#L362
warning: the `Err`-variant returned from this function is very large
--> crates/trustchain-http/src/attestor.rs:362:6
|
362 | ) -> 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#L911
warning: the `Err`-variant returned from this function is very large
--> crates/trustchain-http/src/attestation_utils.rs:911:54
|
98 | FailedToRespond(reqwest::Response),
| ---------------------------------- the largest variant contains at least 152 bytes
...
911 | 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#L903
warning: the `Err`-variant returned from this function is very large
--> crates/trustchain-http/src/attestation_utils.rs:903:61
|
98 | FailedToRespond(reqwest::Response),
| ---------------------------------- the largest variant contains at least 152 bytes
...
903 | 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#L879
warning: the `Err`-variant returned from this function is very large
--> crates/trustchain-http/src/attestation_utils.rs:879:6
|
98 | FailedToRespond(reqwest::Response),
| ---------------------------------- the largest variant contains at least 152 bytes
...
879 | ) -> 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 `network @ _` pattern can be written as just `network`:
crates/trustchain-ion/src/lib.rs#L212
warning: the `network @ _` pattern can be written as just `network`
--> crates/trustchain-ion/src/lib.rs:212:9
|
212 | 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
|