Merge pull request #192 from alan-turing-institute/174-update-deps-re… #526
clippy
6 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 6 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 91 in crates/trustchain-http/src/verifier.rs
github-actions / clippy
large size difference between variants
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/master/index.html#large_enum_variant
= note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
|
89 | Presentation(Box<Presentation>),
| ~~~~~~~~~~~~~~~~~
Check warning on line 214 in crates/trustchain-http/src/attestation_utils.rs
github-actions / clippy
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
--> crates/trustchain-http/src/attestation_utils.rs:214:44
|
214 | 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/master/index.html#ptr_arg
Check warning on line 200 in crates/trustchain-http/src/attestation_utils.rs
github-actions / clippy
writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
warning: writing `&PathBuf` instead of `&Path` involves a new object where a slice will do
--> crates/trustchain-http/src/attestation_utils.rs:200:43
|
200 | 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/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
Check warning on line 278 in crates/trustchain-core/src/utils.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/trustchain-core/src/utils.rs:275:41
|
275 | / ... return json_contains(
276 | | ... cand_map.get(cand_key).unwrap(),
277 | | ... expected,
278 | | ... )
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
275 ~ json_contains(
276 + cand_map.get(cand_key).unwrap(),
277 + expected,
278 + )
|
Check warning on line 298 in crates/trustchain-core/src/utils.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/trustchain-core/src/utils.rs:296:21
|
296 | / return cand_map
297 | | .values()
298 | | .any(|cand_value| json_contains(cand_value, expected));
| |______________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
help: remove `return`
|
296 ~ cand_map
297 + .values()
298 ~ .any(|cand_value| json_contains(cand_value, expected))
|
Check warning on line 261 in crates/trustchain-core/src/utils.rs
github-actions / clippy
unneeded `return` statement
warning: unneeded `return` statement
--> crates/trustchain-core/src/utils.rs:261:13
|
261 | return cand_vec.iter().any(|value| json_contains(value, expected));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
261 - return cand_vec.iter().any(|value| json_contains(value, expected));
261 + cand_vec.iter().any(|value| json_contains(value, expected))
|