feat!: proof system v1 (from v0.1) #544
clippy
1 error, 18 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 18 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.79.0 (129f3b996 2024-06-10)
- cargo 1.79.0 (ffa9cf99a 2024-06-03)
- clippy 0.1.79 (129f3b9 2024-06-10)
Annotations
Check failure on line 147 in grovedb/src/operations/proof/verify.rs
github-actions / clippy
`std::option::Option<element::Element>` doesn't implement `std::fmt::Display`
error[E0277]: `std::option::Option<element::Element>` doesn't implement `std::fmt::Display`
--> grovedb/src/operations/proof/verify.rs:147:33
|
147 | ... e
| ^ `std::option::Option<element::Element>` cannot be formatted with the default formatter
|
= help: the trait `std::fmt::Display` is not implemented for `std::option::Option<element::Element>`, which is required by `&std::option::Option<element::Element>: std::fmt::Display`
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
= note: this error originates in the macro `$crate::__export::format_args` which comes from the expansion of the macro `format` (in Nightly builds, run with -Z macro-backtrace for more info)
Check warning on line 503 in grovedb/src/query/mod.rs
github-actions / clippy
this `else { if .. }` block can be collapsed
warning: this `else { if .. }` block can be collapsed
--> grovedb/src/query/mod.rs:497:16
|
497 | } else {
| ________________^
498 | | if let Some(path) = self.in_path.as_ref() {
499 | | path.as_slice() == key
500 | | } else {
501 | | false
502 | | }
503 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
497 ~ } else if let Some(path) = self.in_path.as_ref() {
498 + path.as_slice() == key
499 + } else {
500 + false
501 + }
|
Check warning on line 3 in grovedb/src/debugger.rs
github-actions / clippy
unused import: `net::Ipv4Addr`
warning: unused import: `net::Ipv4Addr`
--> grovedb/src/debugger.rs:3:15
|
3 | use std::{fs, net::Ipv4Addr, sync::Weak};
| ^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 77 in merk/src/estimated_costs/average_case_costs.rs
github-actions / clippy
duplicated attribute
warning: duplicated attribute
--> merk/src/estimated_costs/average_case_costs.rs:77:7
|
77 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
|
note: first defined here
--> merk/src/estimated_costs/average_case_costs.rs:76:7
|
76 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
help: remove this attribute
--> merk/src/estimated_costs/average_case_costs.rs:77:7
|
77 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
= note: `#[warn(clippy::duplicated_attributes)]` on by default
Check warning on line 806 in merk/src/tree/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:783:5
|
783 | / pub fn put_value_with_reference_value_hash_and_value_cost(
784 | | mut self,
785 | | value: Vec<u8>,
786 | | value_hash: CryptoHash,
... |
805 | | >,
806 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 339 in merk/src/tree/walk/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:316:5
|
316 | / pub fn put_value_with_reference_value_hash_and_value_cost(
317 | | mut self,
318 | | value: Vec<u8>,
319 | | value_hash: CryptoHash,
... |
338 | | >,
339 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 700 in merk/src/tree/ops.rs
github-actions / clippy
this function has too many arguments (9/7)
warning: this function has too many arguments (9/7)
--> merk/src/tree/ops.rs:690:5
|
690 | / fn recurse<K: AsRef<[u8]>, C, V, U, R>(
691 | | self,
692 | | batch: &MerkBatch<K>,
693 | | mid: usize,
... |
699 | | section_removal_bytes: &mut R,
700 | | ) -> CostResult<(Option<Self>, KeyUpdates), Error>
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 386 in merk/src/proofs/query/merge.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> merk/src/proofs/query/merge.rs:385:17
|
385 | / self.default_subquery_branch.subquery =
386 | | other_default_subquery_branch.subquery.clone();
| |__________________________________________________________________^ help: use `clone_from()`: `self.default_subquery_branch.subquery.clone_from(&other_default_subquery_branch.subquery)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 337 in merk/src/proofs/query/merge.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> merk/src/proofs/query/merge.rs:336:25
|
336 | / self.default_subquery_branch.subquery =
337 | | other_default_subquery_branch.subquery.clone();
| |__________________________________________________________________________^ help: use `clone_from()`: `self.default_subquery_branch.subquery.clone_from(&other_default_subquery_branch.subquery)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
Check warning on line 253 in merk/src/proofs/query/merge.rs
github-actions / clippy
assigning the result of `Clone::clone()` may be inefficient
warning: assigning the result of `Clone::clone()` may be inefficient
--> merk/src/proofs/query/merge.rs:253:13
|
253 | self.default_subquery_branch.subquery = other_default_branch_subquery.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.default_subquery_branch.subquery.clone_from(&other_default_branch_subquery)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
= note: `#[warn(clippy::assigning_clones)]` on by default
Check warning on line 5 in merk/src/proofs/chunk.rs
github-actions / clippy
module has the same name as its containing module
warning: module has the same name as its containing module
--> merk/src/proofs/chunk.rs:5:1
|
5 | pub mod chunk;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `#[warn(clippy::module_inception)]` on by default
Check warning on line 578 in merk/src/merk/mod.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:578:10
|
578 | ) -> (BTreeMap<Vec<u8>, CryptoHash>, BTreeMap<Vec<u8>, Vec<u8>>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 286 in merk/src/merk/apply.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/merk/apply.rs:277:5
|
277 | / pub fn apply_unchecked<KB, KA, C, V, U, R>(
278 | | &mut self,
279 | | batch: &MerkBatch<KB>,
280 | | aux: &AuxMerkBatch<KA>,
... |
285 | | section_removal_bytes: &mut R,
286 | | ) -> CostResult<(), Error>
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 199 in merk/src/merk/apply.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> merk/src/merk/apply.rs:176:5
|
176 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>(
177 | | &mut self,
178 | | batch: &MerkBatch<KB>,
179 | | aux: &AuxMerkBatch<KA>,
... |
198 | | >,
199 | | ) -> CostResult<(), Error>
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
= note: `#[warn(clippy::too_many_arguments)]` on by default
Check warning on line 346 in merk/src/merk/chunks.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/chunks.rs:346:33
|
346 | fn next_chunk(&mut self) -> Option<Result<(Vec<Op>, Option<Vec<u8>>), Error>> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 244 in merk/src/proofs/query/map.rs
github-actions / clippy
trait `BTreeMapExtras` is never used
warning: trait `BTreeMapExtras` is never used
--> merk/src/proofs/query/map.rs:244:7
|
244 | trait BTreeMapExtras {
| ^^^^^^^^^^^^^^
Check warning on line 390 in merk/src/merk/restore.rs
github-actions / clippy
method `attempt_state_recovery` is never used
warning: method `attempt_state_recovery` is never used
--> merk/src/merk/restore.rs:390:8
|
66 | impl<'db, S: StorageContext<'db>> Restorer<S> {
| --------------------------------------------- method in this implementation
...
390 | fn attempt_state_recovery(&mut self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Check warning on line 3 in merk/src/tree/fuzz_tests.rs
github-actions / clippy
'test' may be misspelled as 'tests'
warning: 'test' may be misspelled as 'tests'
--> merk/src/tree/fuzz_tests.rs:3:8
|
3 | #![cfg(tests)]
| ^^^^^ help: did you mean: `test`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#maybe_misused_cfg
= note: `#[warn(clippy::maybe_misused_cfg)]` on by default
Check warning on line 6 in grovedb/build.rs
github-actions / clippy
unused import: `ExitStatus`
warning: unused import: `ExitStatus`
--> grovedb/build.rs:6:28
|
6 | process::{Command, ExitStatus, Output},
| ^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default