Skip to content

feat: various helper functions and fixes for platform contested resources PR #292

feat: various helper functions and fixes for platform contested resources PR

feat: various helper functions and fixes for platform contested resources PR #292

Triggered via pull request June 27, 2024 10:39
Status Success
Total duration 7m 23s
Artifacts

coverage.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

1 error and 19 warnings
non-exhaustive patterns: `element::Element::Reference(reference_path::ReferencePathType::UpstreamRootHeightWithParentPathAdditionReference(_, _), _, _)` not covered: grovedb/src/debugger.rs#L134
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!() |
unused import: `reference_path::ReferencePathType`: grovedb/src/operations/proof/util.rs#L44
warning: unused import: `reference_path::ReferencePathType` --> grovedb/src/operations/proof/util.rs:44:57 | 44 | use crate::{operations::proof::verify::ProvedKeyValues, reference_path::ReferencePathType}; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `net::Ipv4Addr`: grovedb/src/debugger.rs#L3
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
duplicated attribute: merk/src/estimated_costs/average_case_costs.rs#L77
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
this function has too many arguments (8/7): merk/src/tree/mod.rs#L811
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
this function has too many arguments (8/7): merk/src/tree/walk/mod.rs#L344
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
this function has too many arguments (9/7): merk/src/tree/ops.rs#L718
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
assigning the result of `Clone::clone()` may be inefficient: merk/src/proofs/query/merge.rs#L385
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
assigning the result of `Clone::clone()` may be inefficient: merk/src/proofs/query/merge.rs#L336
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
assigning the result of `Clone::clone()` may be inefficient: merk/src/proofs/query/merge.rs#L253
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
module has the same name as its containing module: merk/src/proofs/chunk.rs#L33
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
very complex type used. Consider factoring parts into `type` definitions: merk/src/merk/mod.rs#L570
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
this function has too many arguments (8/7): merk/src/merk/apply.rs#L277
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
this function has too many arguments (8/7): merk/src/merk/apply.rs#L176
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
very complex type used. Consider factoring parts into `type` definitions: merk/src/merk/chunks.rs#L374
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
method `attempt_state_recovery` is never used: merk/src/merk/restore.rs#L390
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
unused import: `ops::RangeFull`: merk/src/proofs/query/mod.rs#L47
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
'test' may be misspelled as 'tests': merk/src/tree/fuzz_tests.rs#L31
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
Code Coverage
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
Code Coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/