Skip to content

feat: big sum trees and count trees #444

feat: big sum trees and count trees

feat: big sum trees and count trees #444

Triggered via pull request January 8, 2025 05:52
Status Success
Total duration 7m 33s
Artifacts

coverage.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 errors and 58 warnings
non-exhaustive patterns: `grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)` and `grovedb_merk::TreeFeatureType::CountedMerkNode(_)` not covered: grovedb/src/debugger.rs#L629
error[E0004]: non-exhaustive patterns: `grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)` and `grovedb_merk::TreeFeatureType::CountedMerkNode(_)` not covered --> grovedb/src/debugger.rs:629:29 | 629 | feature_type: match feature_type { | ^^^^^^^^^^^^ patterns `grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)` and `grovedb_merk::TreeFeatureType::CountedMerkNode(_)` not covered | note: `grovedb_merk::TreeFeatureType` defined here --> /home/runner/work/grovedb/grovedb/merk/src/tree/tree_feature_type.rs:24:1 | 24 | pub enum TreeFeatureType { | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 30 | BigSummedMerkNode(i128), | ----------------- not covered 31 | /// Counted Merk Tree None 32 | CountedMerkNode(u64), | --------------- not covered = note: the matched value is of type `grovedb_merk::TreeFeatureType` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | 633 ~ }, 634 + grovedb_merk::TreeFeatureType::BigSummedMerkNode(_) | grovedb_merk::TreeFeatureType::CountedMerkNode(_) => todo!() |
non-exhaustive patterns: `element::Element::BigSumTree(_, _, _)` and `element::Element::CountTree(_, _, _)` not covered: grovedb/src/debugger.rs#L512
error[E0004]: non-exhaustive patterns: `element::Element::BigSumTree(_, _, _)` and `element::Element::CountTree(_, _, _)` not covered --> grovedb/src/debugger.rs:512:11 | 512 | match element { | ^^^^^^^ patterns `element::Element::BigSumTree(_, _, _)` and `element::Element::CountTree(_, _, _)` not covered | note: `element::Element` defined here --> grovedb/src/element/mod.rs:110:10 | 110 | pub enum Element { | ^^^^^^^ ... 126 | BigSumTree(Option<Vec<u8>>, BigSumValue, Option<ElementFlags>), | ---------- not covered ... 129 | CountTree(Option<Vec<u8>>, CountValue, 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, a match arm with multiple or-patterns as shown, or multiple match arms | 599 ~ }, 600 ~ element::Element::BigSumTree(_, _, _) | element::Element::CountTree(_, _, _) => todo!(), |
non-exhaustive patterns: `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_))` and `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_))` not covered: grovedb/src/debugger.rs#L388
error[E0004]: non-exhaustive patterns: `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_))` and `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_))` not covered --> grovedb/src/debugger.rs:388:14 | 388 | Ok(match node { | ^^^^ patterns `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_))` and `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_))` not covered | note: `grovedb_merk::proofs::Node` defined here --> /home/runner/work/grovedb/grovedb/merk/src/proofs/mod.rs:61:1 | 61 | pub enum Node { | ^^^^^^^^^^^^^ ... 80 | KVValueHashFeatureType(Vec<u8>, Vec<u8>, CryptoHash, TreeFeatureType), | ---------------------- not covered = note: the matched value is of type `grovedb_merk::proofs::Node` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | 421 ~ }, 422 + grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)) | grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_)) => todo!() |
elided lifetime has a name: grovedb/src/operations/insert/mod.rs#L371
warning: elided lifetime has a name --> grovedb/src/operations/insert/mod.rs:371:26 | 363 | fn add_element_without_transaction<'db, B: AsRef<[u8]>>( | --- lifetime `'db` declared here ... 371 | ) -> CostResult<Merk<PrefixedRocksDbStorageContext>, Error> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'db`
elided lifetime has a name: grovedb/src/batch/mod.rs#L2267
warning: elided lifetime has a name --> grovedb/src/batch/mod.rs:2267:26 | 2261 | pub fn open_batch_merk_at_path<'a, B: AsRef<[u8]>>( | -- lifetime `'a` declared here ... 2267 | ) -> CostResult<Merk<PrefixedRocksDbStorageContext>, Error> { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default
unused import: `IsSumTree`: grovedb/src/batch/estimated_costs/average_case_costs.rs#L16
warning: unused import: `IsSumTree` --> grovedb/src/batch/estimated_costs/average_case_costs.rs:16:5 | 16 | IsSumTree, | ^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
method `aggregateData` should have a snake case name: merk/src/tree/link.rs#L166
warning: method `aggregateData` should have a snake case name --> merk/src/tree/link.rs:166:18 | 166 | pub const fn aggregateData(&self) -> AggregateData { | ^^^^^^^^^^^^^ help: convert the identifier to snake case: `aggregate_data` | = note: `#[warn(non_snake_case)]` on by default
the following explicit lifetimes could be elided: 'a: merk/src/visualize.rs#L87
warning: the following explicit lifetimes could be elided: 'a --> merk/src/visualize.rs:87:6 | 87 | impl<'a, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize for VisualizableTree<'a, F> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 87 - impl<'a, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize for VisualizableTree<'a, F> { 87 + impl<T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize for VisualizableTree<'_, F> { |
the following explicit lifetimes could be elided: 'a: merk/src/visualize.rs#L68
warning: the following explicit lifetimes could be elided: 'a --> merk/src/visualize.rs:68:6 | 68 | impl<'a, 'db, S: StorageContext<'db>, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize | ^^ 69 | for VisualizeableMerk<'a, S, F> | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 68 ~ impl<'db, S: StorageContext<'db>, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize 69 ~ for VisualizeableMerk<'_, S, F> |
casting to the same type is unnecessary (`u32` -> `u32`): merk/src/estimated_costs/average_case_costs.rs#L718
warning: casting to the same type is unnecessary (`u32` -> `u32`) --> merk/src/estimated_costs/average_case_costs.rs:718:24 | 718 | cost.seek_count += nodes_updated as u32; | ^^^^^^^^^^^^^^^^^^^^ help: try: `nodes_updated` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u32` -> `u32`): merk/src/estimated_costs/average_case_costs.rs#L450
warning: casting to the same type is unnecessary (`u32` -> `u32`) --> merk/src/estimated_costs/average_case_costs.rs:450:24 | 450 | cost.seek_count += nodes_updated as u32; | ^^^^^^^^^^^^^^^^^^^^ help: try: `nodes_updated` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
duplicated attribute: merk/src/estimated_costs/average_case_costs.rs#L51
warning: duplicated attribute --> merk/src/estimated_costs/average_case_costs.rs:51:7 | 51 | #[cfg(feature = "full")] | ^^^^^^^^^^^^^^^^ | note: first defined here --> merk/src/estimated_costs/average_case_costs.rs:50:7 | 50 | #[cfg(feature = "full")] | ^^^^^^^^^^^^^^^^ help: remove this attribute --> merk/src/estimated_costs/average_case_costs.rs:51:7 | 51 | #[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 (9/7): merk/src/tree/mod.rs#L930
warning: this function has too many arguments (9/7) --> merk/src/tree/mod.rs:930:5 | 930 | / pub fn put_value_with_reference_value_hash_and_value_cost( 931 | | mut self, 932 | | value: Vec<u8>, 933 | | value_hash: CryptoHash, ... | 956 | | >, 957 | | ) -> 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/mod.rs#L872
warning: this function has too many arguments (8/7) --> merk/src/tree/mod.rs:872:5 | 872 | / pub fn put_value_and_reference_value_hash( 873 | | mut self, 874 | | value: Vec<u8>, 875 | | value_hash: CryptoHash, ... | 897 | | >, 898 | | ) -> 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/mod.rs#L816
warning: this function has too many arguments (8/7) --> merk/src/tree/mod.rs:816:5 | 816 | / pub fn put_value_with_fixed_cost( 817 | | mut self, 818 | | value: Vec<u8>, 819 | | value_fixed_cost: u32, ... | 841 | | >, 842 | | ) -> CostResult<Self, Error> { | |________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
casting integer literal to `u32` is unnecessary: merk/src/tree/mod.rs#L461
warning: casting integer literal to `u32` is unnecessary --> merk/src/tree/mod.rs:461:49 | 461 | AggregateData::BigSum(_) => 16 as u32, | ^^^^^^^^^ help: try: `16_u32` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast = note: `#[warn(clippy::unnecessary_cast)]` on by default
this function has too many arguments (9/7): merk/src/tree/walk/mod.rs#L341
warning: this function has too many arguments (9/7) --> merk/src/tree/walk/mod.rs:341:5 | 341 | / pub fn put_value_with_reference_value_hash_and_value_cost( 342 | | mut self, 343 | | value: Vec<u8>, 344 | | value_hash: CryptoHash, ... | 367 | | >, 368 | | ) -> 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#L295
warning: this function has too many arguments (8/7) --> merk/src/tree/walk/mod.rs:295:5 | 295 | / pub fn put_value_and_reference_value_hash( 296 | | mut self, 297 | | value: Vec<u8>, 298 | | value_hash: CryptoHash, ... | 320 | | >, 321 | | ) -> 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#L249
warning: this function has too many arguments (8/7) --> merk/src/tree/walk/mod.rs:249:5 | 249 | / pub fn put_value_with_fixed_cost( 250 | | mut self, 251 | | value: Vec<u8>, 252 | | value_fixed_cost: u32, ... | 274 | | >, 275 | | ) -> 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 (11/7): merk/src/tree/ops.rs#L733
warning: this function has too many arguments (11/7) --> merk/src/tree/ops.rs:733:5 | 733 | / fn recurse<K: AsRef<[u8]>, C, V, T, U, R>( 734 | | self, 735 | | batch: &MerkBatch<K>, 736 | | mid: usize, ... | 744 | | grove_version: &GroveVersion, 745 | | ) -> CostResult<(Option<Self>, KeyUpdates), 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/ops.rs#L415
warning: this function has too many arguments (8/7) --> merk/src/tree/ops.rs:415:5 | 415 | / fn apply_sorted<K: AsRef<[u8]>, C, V, T, U, R>( 416 | | self, 417 | | batch: &MerkBatch<K>, 418 | | old_specialized_cost: &C, ... | 423 | | grove_version: &GroveVersion, 424 | | ) -> CostResult<(Option<Self>, KeyUpdates), 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/ops.rs#L235
warning: this function has too many arguments (8/7) --> merk/src/tree/ops.rs:235:5 | 235 | / fn build<K: AsRef<[u8]>, C, V, T, U, R>( 236 | | batch: &MerkBatch<K>, 237 | | source: S, 238 | | old_tree_cost: &C, ... | 243 | | grove_version: &GroveVersion, 244 | | ) -> CostResult<Option<TreeNode>, 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#L148
warning: this function has too many arguments (9/7) --> merk/src/tree/ops.rs:148:5 | 148 | / pub fn apply_to<K: AsRef<[u8]>, C, V, T, U, R>( 149 | | maybe_tree: Option<Self>, 150 | | batch: &MerkBatch<K>, 151 | | source: S, ... | 157 | | grove_version: &GroveVersion, 158 | | ) -> CostContext<Result<(Option<TreeNode>, KeyUpdates), Error>> | |___________________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
the following explicit lifetimes could be elided: 'a: merk/src/tree/iter.rs#L68
warning: the following explicit lifetimes could be elided: 'a --> merk/src/tree/iter.rs:68:6 | 68 | impl<'a> Iterator for Iter<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 68 - impl<'a> Iterator for Iter<'a> { 68 + impl Iterator for Iter<'_> { |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/query/mod.rs#L705
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/query/mod.rs:705:6 | 705 | impl<'a, S> RefWalker<'a, S> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 705 - impl<'a, S> RefWalker<'a, S> 705 + impl<S> RefWalker<'_, S> |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/query/map.rs#L162
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/query/map.rs:162:6 | 162 | impl<'a> Range<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 162 - impl<'a> Range<'a> { 162 + impl Range<'_> { |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/encoding.rs#L417
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/encoding.rs:417:6 | 417 | impl<'a> Iterator for Decoder<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 417 - impl<'a> Iterator for Decoder<'a> { 417 + impl Iterator for Decoder<'_> { |
unneeded `return` statement: merk/src/proofs/chunk/chunk.rs#L217
warning: unneeded `return` statement --> merk/src/proofs/chunk/chunk.rs:217:5 | 217 | / return Ok(match height_proof_tree.child(LEFT) { 218 | | Some(child) => { 219 | | if !matches!(child.tree.node, Node::KVHash(..)) { 220 | | // todo deal with old chunk restoring error ... | 227 | | None => 1, 228 | | }); | |______^ | = 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` | 217 ~ Ok(match height_proof_tree.child(LEFT) { 218 + Some(child) => { 219 + if !matches!(child.tree.node, Node::KVHash(..)) { 220 + // todo deal with old chunk restoring error 221 + return Err(Error::OldChunkRestoringError( 222 + "Expected left nodes in height proofs to be kvhash nodes".to_string(), 223 + )); 224 + } 225 + verify_height_tree(&child.tree)? + 1 226 + } 227 + None => 1, 228 ~ }) |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/chunk/chunk.rs#L43
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/chunk/chunk.rs:43:6 | 43 | impl<'a, S> RefWalker<'a, S> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 43 - impl<'a, S> RefWalker<'a, S> 43 + impl<S> RefWalker<'_, S> |
module has the same name as its containing module: merk/src/proofs/chunk.rs#L5
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
this function has too many arguments (8/7): merk/src/merk/mod.rs#L752
warning: this function has too many arguments (8/7) --> merk/src/merk/mod.rs:752:5 | 752 | / fn verify_link( 753 | | &self, 754 | | link: &Link, 755 | | parent_key: &[u8], ... | 760 | | grove_version: &GroveVersion, 761 | | ) { | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
very complex type used. Consider factoring parts into `type` definitions: merk/src/merk/mod.rs#L692
warning: very complex type used. Consider factoring parts into `type` definitions --> merk/src/merk/mod.rs:692:10 | 692 | ) -> (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
the following explicit lifetimes could be elided: 'a: merk/src/merk/mod.rs#L193
warning: the following explicit lifetimes could be elided: 'a --> merk/src/merk/mod.rs:193:6 | 193 | impl<'a, I: RawIterator> KVIterator<'a, I> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 193 - impl<'a, I: RawIterator> KVIterator<'a, I> { 193 + impl<I: RawIterator> KVIterator<'_, I> { |
the following explicit lifetimes could be elided: 's: merk/src/merk/source.rs#L38
warning: the following explicit lifetimes could be elided: 's --> merk/src/merk/source.rs:38:6 | 38 | impl<'s, 'db, S> Fetch for MerkSource<'s, S> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 38 - impl<'s, 'db, S> Fetch for MerkSource<'s, S> 38 + impl<'db, S> Fetch for MerkSource<'_, S> |
the following explicit lifetimes could be elided: 's: merk/src/merk/source.rs#L29
warning: the following explicit lifetimes could be elided: 's --> merk/src/merk/source.rs:29:6 | 29 | impl<'s, S> Clone for MerkSource<'s, S> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 29 - impl<'s, S> Clone for MerkSource<'s, S> { 29 + impl<S> Clone for MerkSource<'_, S> { |
this function has too many arguments (10/7): merk/src/merk/apply.rs#L322
warning: this function has too many arguments (10/7) --> merk/src/merk/apply.rs:322:5 | 322 | / pub fn apply_unchecked<KB, KA, C, V, T, U, R>( 323 | | &mut self, 324 | | batch: &MerkBatch<KB>, 325 | | aux: &AuxMerkBatch<KA>, ... | 332 | | grove_version: &GroveVersion, 333 | | ) -> 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 (10/7): merk/src/merk/apply.rs#L206
warning: this function has too many arguments (10/7) --> merk/src/merk/apply.rs:206:5 | 206 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>( 207 | | &mut self, 208 | | batch: &MerkBatch<KB>, 209 | | aux: &AuxMerkBatch<KA>, ... | 235 | | grove_version: &GroveVersion, 236 | | ) -> 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#L393
warning: very complex type used. Consider factoring parts into `type` definitions --> merk/src/merk/chunks.rs:393:10 | 393 | ) -> 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
very complex type used. Consider factoring parts into `type` definitions: merk/src/merk/chunks.rs#L363
warning: very complex type used. Consider factoring parts into `type` definitions --> merk/src/merk/chunks.rs:363:10 | 363 | ) -> 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 `apply_sorted_without_costs` is never used: merk/src/tree/ops.rs#L390
warning: method `apply_sorted_without_costs` is never used --> merk/src/tree/ops.rs:390:19 | 139 | / impl<S> Walker<S> 140 | | where 141 | | S: Fetch + Sized + Clone, | |_____________________________- method in this implementation ... 390 | pub(crate) fn apply_sorted_without_costs<K: AsRef<[u8]>>( | ^^^^^^^^^^^^^^^^^^^^^^^^^^
method `attempt_state_recovery` is never used: merk/src/merk/restore.rs#L417
warning: method `attempt_state_recovery` is never used --> merk/src/merk/restore.rs:417:8 | 67 | impl<'db, S: StorageContext<'db>> Restorer<S> { | --------------------------------------------- method in this implementation ... 417 | fn attempt_state_recovery(&mut self, grove_version: &GroveVersion) -> Result<(), Error> { | ^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
unexpected `cfg` condition name: `tests`: merk/src/tree/fuzz_tests.rs#L3
warning: unexpected `cfg` condition name: `tests` --> merk/src/tree/fuzz_tests.rs:3:8 | 3 | #![cfg(tests)] | ^^^^^ help: there is a config with a similar name: `test` | = help: consider using a Cargo feature instead = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(tests)'] } = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(tests)");` to the top of the `build.rs` = note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html> for more information about checking conditional configuration = note: `#[warn(unexpected_cfgs)]` on by default
unused imports: `BigSummedMerkNode` and `CountedMerkNode`: merk/src/proofs/tree.rs#L26
warning: unused imports: `BigSummedMerkNode` and `CountedMerkNode` --> merk/src/proofs/tree.rs:26:23 | 26 | TreeFeatureType::{BigSummedMerkNode, CountedMerkNode}, | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^
unused import: `TreeFeatureType::SummedMerkNode`: merk/src/proofs/tree.rs#L22
warning: unused import: `TreeFeatureType::SummedMerkNode` --> merk/src/proofs/tree.rs:22:5 | 22 | TreeFeatureType::SummedMerkNode, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
elided lifetime has a name: merk/src/proofs/query/map.rs#L110
warning: elided lifetime has a name --> merk/src/proofs/query/map.rs:110:72 | 110 | pub fn range<'a, R: RangeBounds<&'a [u8]>>(&'a self, bounds: R) -> Range { | -- lifetime `'a` declared here ^^^^^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default
using `map` over `inspect`: storage/src/rocksdb_storage/storage_context/raw_iterator.rs#L214
warning: using `map` over `inspect` --> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:214:39 | 214 | self.raw_iterator.value().map(|v| { | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect help: try | 214 ~ self.raw_iterator.value().inspect(|v| { 215 ~ cost.storage_loaded_bytes += v.len() as u64; |
using `map` over `inspect`: storage/src/rocksdb_storage/storage_context/raw_iterator.rs#L93
warning: using `map` over `inspect` --> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:93:39 | 93 | self.raw_iterator.value().map(|v| { | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_inspect = note: `#[warn(clippy::manual_inspect)]` on by default help: try | 93 ~ self.raw_iterator.value().inspect(|v| { 94 ~ cost.storage_loaded_bytes += v.len() as u64; |
the following explicit lifetimes could be elided: 'a: storage/src/rocksdb_storage/storage_context/raw_iterator.rs#L49
warning: the following explicit lifetimes could be elided: 'a --> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:49:6 | 49 | impl<'a> RawIterator for PrefixedRocksDbRawIterator<DBRawIteratorWithThreadMode<'a, Db>> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 49 - impl<'a> RawIterator for PrefixedRocksDbRawIterator<DBRawIteratorWithThreadMode<'a, Db>> { 49 + impl RawIterator for PrefixedRocksDbRawIterator<DBRawIteratorWithThreadMode<'_, Db>> { |
the following explicit lifetimes could be elided: 'db: storage/src/rocksdb_storage/storage_context/batch.rs#L36
warning: the following explicit lifetimes could be elided: 'db --> storage/src/rocksdb_storage/storage_context/batch.rs:36:6 | 36 | impl<'db> Batch for PrefixedRocksDbBatch<'db> { | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 36 - impl<'db> Batch for PrefixedRocksDbBatch<'db> { 36 + impl Batch for PrefixedRocksDbBatch<'_> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_iter.rs#L150
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_iter.rs:150:6 | 150 | impl<'b, B> Clone for CurrentSubtreePathIter<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 150 - impl<'b, B> Clone for CurrentSubtreePathIter<'b, B> { 150 + impl<B> Clone for CurrentSubtreePathIter<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_iter.rs#L45
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_iter.rs:45:6 | 45 | impl<'b, B> Clone for SubtreePathIter<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 45 - impl<'b, B> Clone for SubtreePathIter<'b, B> { 45 + impl<B> Clone for SubtreePathIter<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_builder.rs#L88
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_builder.rs:88:6 | 88 | impl<'b, B: AsRef<[u8]>> Eq for SubtreePathBuilder<'b, B> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 88 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePathBuilder<'b, B> {} 88 + impl<B: AsRef<[u8]>> Eq for SubtreePathBuilder<'_, B> {} |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path_builder.rs#L78
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path_builder.rs:78:6 | 78 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 78 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL> 78 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path_builder.rs#L68
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path_builder.rs:68:6 | 68 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 68 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL> 68 + impl<'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path_builder.rs#L58
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path_builder.rs:58:6 | 58 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 58 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL> 58 + impl<'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'_, BL> |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_builder.rs#L51
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_builder.rs:51:6 | 51 | impl<'b, B: AsRef<[u8]>> Hash for SubtreePathBuilder<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 51 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePathBuilder<'b, B> { 51 + impl<B: AsRef<[u8]>> Hash for SubtreePathBuilder<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path.rs#L111
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path.rs:111:6 | 111 | impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 111 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> { 111 + impl<B: AsRef<[u8]>> Hash for SubtreePath<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path.rs#L81
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path.rs:81:6 | 81 | impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 81 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {} 81 + impl<B: AsRef<[u8]>> Eq for SubtreePath<'_, B> {} |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L69
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:69:6 | 69 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 69 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL> 69 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'_, BL> |
doc list item without indentation: costs/src/context.rs#L173
warning: doc list item without indentation --> costs/src/context.rs:173:5 | 173 | /// accumulator; 4. Early termination uses external cost accumulator so previous | ^ | = help: if this is supposed to be its own paragraph, add a blank line = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation = note: `#[warn(clippy::doc_lazy_continuation)]` on by default help: indent this line | 173 | /// accumulator; 4. Early termination uses external cost accumulator so previous | +++
Code Coverage
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636