feat: various helper functions and fixes for platform contested resources PR #287
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 134 in grovedb/src/debugger.rs
github-actions / clippy
non-exhaustive patterns: `element::Element::Reference(reference_path::ReferencePathType::UpstreamRootHeightWithParentPathAdditionReference(_, _), _, _)` not covered
error[E0004]: non-exhaustive patterns: `element::Element::Reference(reference_path::ReferencePathType::UpstreamRootHeightWithParentPathAdditionReference(_, _), _, _)` not covered
--> grovedb/src/debugger.rs:134:25
|
134 | let element = match grovedb_element {
| ^^^^^^^^^^^^^^^ pattern `element::Element::Reference(reference_path::ReferencePathType::UpstreamRootHeightWithParentPathAdditionReference(_, _), _, _)` not covered
|
note: `element::Element` defined here
--> grovedb/src/element/mod.rs:99:10
|
99 | pub enum Element {
| ^^^^^^^
...
103 | Reference(ReferencePathType, MaxReferenceHop, Option<ElementFlags>),
| --------- not covered
= note: the matched value is of type `element::Element`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
|
166 ~ },
167 + element::Element::Reference(reference_path::ReferencePathType::UpstreamRootHeightWithParentPathAdditionReference(_, _), _, _) => todo!()
|
Check warning on line 43 in grovedb/src/operations/proof/util.rs
github-actions / clippy
unused import: `reference_path::ReferencePathType`
warning: unused import: `reference_path::ReferencePathType`
--> grovedb/src/operations/proof/util.rs:43:57
|
43 | use crate::{operations::proof::verify::ProvedKeyValues, reference_path::ReferencePathType};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 834 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:811:5
|
811 | / pub fn put_value_with_reference_value_hash_and_value_cost(
812 | | mut self,
813 | | value: Vec<u8>,
814 | | value_hash: CryptoHash,
... |
833 | | >,
834 | | ) -> 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 367 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:344:5
|
344 | / pub fn put_value_with_reference_value_hash_and_value_cost(
345 | | mut self,
346 | | value: Vec<u8>,
347 | | value_hash: CryptoHash,
... |
366 | | >,
367 | | ) -> 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 728 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:718:5
|
718 | / fn recurse<K: AsRef<[u8]>, C, V, U, R>(
719 | | self,
720 | | batch: &MerkBatch<K>,
721 | | mid: usize,
... |
727 | | section_removal_bytes: &mut R,
728 | | ) -> 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 33 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:33:1
|
33 | 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 570 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:570:10
|
570 | ) -> (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 374 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:374:33
|
374 | 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 405 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:405:7
|
405 | 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 47 in merk/src/proofs/query/mod.rs
github-actions / clippy
unused import: `ops::RangeFull`
warning: unused import: `ops::RangeFull`
--> merk/src/proofs/query/mod.rs:47:33
|
47 | use std::{collections::HashSet, ops::RangeFull};
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check warning on line 31 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:31:8
|
31 | #![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