clippy
67 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 67 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.74.1 (a28077b28 2023-12-04)
- cargo 1.74.1 (ecb9851af 2023-10-18)
- clippy 0.1.74 (a28077b 2023-12-04)
Annotations
Check warning on line 504 in trustchain-cli/src/bin/main.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-cli/src/bin/main.rs:504:65
|
504 | initiate_content_challenge(&path, ddid, &services, &attestor_public_key)
| ^^^^^^^^^ help: change this to: `services`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 430 in trustchain-cli/src/bin/main.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-cli/src/bin/main.rs:430:73
|
430 | let identity_challenge = present_identity_challenge(&did, &temp_p_key)?;
| ^^^^ help: change this to: `did`
|
= 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
Check warning on line 188 in trustchain-http/src/attestor.rs
github-actions / clippy
unused `std::result::Result` that must be used
warning: unused `std::result::Result` that must be used
--> trustchain-http/src/attestor.rs:188:9
|
188 | content_initiation.elementwise_serialize(&path);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
188 | let _ = content_initiation.elementwise_serialize(&path);
| +++++++
Check warning on line 306 in trustchain-http/src/requester.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> trustchain-http/src/requester.rs:306:18
|
306 | .map_err(|err| TrustchainCRError::Reqwest(err))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TrustchainCRError::Reqwest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 278 in trustchain-http/src/requester.rs
github-actions / clippy
used `unwrap()` on `Some` value
warning: used `unwrap()` on `Some` value
--> trustchain-http/src/requester.rs:278:34
|
278 | ... &Some(Value::from(nonce.clone())).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_literal_unwrap
= note: `#[warn(clippy::unnecessary_literal_unwrap)]` on by default
help: remove the `Some` and `unwrap()`
|
278 - &Some(Value::from(nonce.clone())).unwrap(),
278 + &Value::from(nonce.clone()),
|
Check warning on line 250 in trustchain-http/src/requester.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/requester.rs:250:41
|
250 | let ion_attestor = IONAttestor::new(&ddid);
| ^^^^^ help: change this to: `ddid`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 226 in trustchain-http/src/requester.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/requester.rs:226:83
|
226 | let identity_initiation = IdentityCRInitiation::new().elementwise_deserialize(&path);
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 194 in trustchain-http/src/requester.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/requester.rs:194:9
|
194 | &path,
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 189 in trustchain-http/src/requester.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> trustchain-http/src/requester.rs:189:18
|
189 | .map_err(|err| TrustchainCRError::Reqwest(err))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TrustchainCRError::Reqwest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 180 in trustchain-http/src/requester.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> trustchain-http/src/requester.rs:180:18
|
180 | .map_err(|err| TrustchainCRError::Reqwest(err))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TrustchainCRError::Reqwest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 160 in trustchain-http/src/requester.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/requester.rs:160:34
|
160 | .elementwise_deserialize(&path)
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 125 in trustchain-http/src/requester.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> trustchain-http/src/requester.rs:125:18
|
125 | .map_err(|err| TrustchainCRError::Reqwest(err))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TrustchainCRError::Reqwest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 111 in trustchain-http/src/requester.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/requester.rs:111:75
|
111 | .sign_and_encrypt_claim(&decrypted_verified_payload, &temp_s_key, &attestor_p_key)
| ^^^^^^^^^^^^^^^ help: change this to: `attestor_p_key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 106 in trustchain-http/src/requester.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/requester.rs:106:13
|
106 | &attestor_p_key,
| ^^^^^^^^^^^^^^^ help: change this to: `attestor_p_key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 63 in trustchain-http/src/requester.rs
github-actions / clippy
redundant closure
warning: redundant closure
--> trustchain-http/src/requester.rs:63:18
|
63 | .map_err(|err| TrustchainCRError::Reqwest(err))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `TrustchainCRError::Reqwest`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
Check warning on line 375 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:375:34
|
375 | .elementwise_deserialize(&path)
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 359 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:359:65
|
359 | attestor.sign_and_encrypt_claim(&payload, &signing_key, &temp_p_key);
| ^^^^^^^^^^^ help: change this to: `temp_p_key`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 354 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:354:28
|
354 | ssi_to_josekit_jwk(&signing_key_ssi).map_err(|_| TrustchainCRError::FailedToGenerateKey)?;
| ^^^^^^^^^^^^^^^^ help: change this to: `signing_key_ssi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 286 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:286:46
|
286 | let signing_key = ssi_to_josekit_jwk(&signing_key_ssi).unwrap();
| ^^^^^^^^^^^^^^^^ help: change this to: `signing_key_ssi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 271 in trustchain-http/src/attestor.rs
github-actions / clippy
the borrowed expression implements the required traits
warning: the borrowed expression implements the required traits
--> trustchain-http/src/attestor.rs:271:34
|
271 | let path = pathbase.join(&key_id);
| ^^^^^^^ help: change this to: `key_id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
Check warning on line 223 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:223:46
|
223 | let signing_key = ssi_to_josekit_jwk(&signing_key_ssi).unwrap();
| ^^^^^^^^^^^^^^^^ help: change this to: `signing_key_ssi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 209 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:209:29
|
209 | ... &requester_keys.get(key_id).unwrap(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `requester_keys.get(key_id).unwrap()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check warning on line 152 in trustchain-http/src/attestor.rs
github-actions / clippy
statement with no effect
warning: statement with no effect
--> trustchain-http/src/attestor.rs:152:17
|
152 | (StatusCode::BAD_REQUEST, response);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
Check warning on line 145 in trustchain-http/src/attestor.rs
github-actions / clippy
statement with no effect
warning: statement with no effect
--> trustchain-http/src/attestor.rs:145:17
|
145 | (StatusCode::OK, respone);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect
= note: `#[warn(clippy::no_effect)]` on by default
Check warning on line 124 in trustchain-http/src/attestor.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> trustchain-http/src/attestor.rs:124:46
|
124 | let signing_key = ssi_to_josekit_jwk(&signing_key_ssi);
| ^^^^^^^^^^^^^^^^ help: change this to: `signing_key_ssi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow