feat: big sum trees and count trees #453
Annotations
3 errors and 57 warnings
non-exhaustive patterns: `grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)`, `grovedb_merk::TreeFeatureType::CountedMerkNode(_)` and `grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _)` not covered:
grovedb/src/debugger.rs#L629
error[E0004]: non-exhaustive patterns: `grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)`, `grovedb_merk::TreeFeatureType::CountedMerkNode(_)` and `grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _)` not covered
--> grovedb/src/debugger.rs:629:29
|
629 | feature_type: match feature_type {
| ^^^^^^^^^^^^ patterns `grovedb_merk::TreeFeatureType::BigSummedMerkNode(_)`, `grovedb_merk::TreeFeatureType::CountedMerkNode(_)` and `grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _)` not covered
|
note: `grovedb_merk::TreeFeatureType` defined here
--> /home/runner/work/grovedb/grovedb/merk/src/tree/tree_feature_type.rs:25:1
|
25 | pub enum TreeFeatureType {
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
31 | BigSummedMerkNode(i128),
| ----------------- not covered
32 | /// Counted Merk Tree None
33 | CountedMerkNode(u64),
| --------------- not covered
34 | /// Counted and summed Merk Tree None
35 | CountedSummedMerkNode(u64, i64),
| --------------------- 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(_) | grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _) => todo!()
|
|
non-exhaustive patterns: `element::Element::BigSumTree(_, _, _)`, `element::Element::CountTree(_, _, _)` and `element::Element::CountSumTree(_, _, _, _)` not covered:
grovedb/src/debugger.rs#L512
error[E0004]: non-exhaustive patterns: `element::Element::BigSumTree(_, _, _)`, `element::Element::CountTree(_, _, _)` and `element::Element::CountSumTree(_, _, _, _)` not covered
--> grovedb/src/debugger.rs:512:11
|
512 | match element {
| ^^^^^^^ patterns `element::Element::BigSumTree(_, _, _)`, `element::Element::CountTree(_, _, _)` and `element::Element::CountSumTree(_, _, _, _)` not covered
|
note: `element::Element` defined here
--> grovedb/src/element/mod.rs:116:10
|
116 | pub enum Element {
| ^^^^^^^
...
132 | BigSumTree(Option<Vec<u8>>, BigSumValue, Option<ElementFlags>),
| ---------- not covered
...
135 | CountTree(Option<Vec<u8>>, CountValue, Option<ElementFlags>),
| --------- not covered
136 | /// Combines Element::SumTree and Element::CountTree
137 | CountSumTree(Option<Vec<u8>>, CountValue, SumValue, 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(_, _, _) | element::Element::CountSumTree(_, _, _, _) => todo!(),
|
|
non-exhaustive patterns: `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_))`, `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_))` and `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _))` not covered:
grovedb/src/debugger.rs#L388
error[E0004]: non-exhaustive patterns: `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_))`, `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_))` and `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _))` not covered
--> grovedb/src/debugger.rs:388:14
|
388 | Ok(match node {
| ^^^^ patterns `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::BigSummedMerkNode(_))`, `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedMerkNode(_))` and `grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _))` 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(_)) | grovedb_merk::proofs::Node::KVValueHashFeatureType(_, _, _, grovedb_merk::TreeFeatureType::CountedSummedMerkNode(_, _)) => 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`
|
unused imports: `operations::proof::util::path_as_slices_hex_to_ascii` and `replication::utils::path_to_string`:
grovedb/src/operations/get/mod.rs#L26
warning: unused imports: `operations::proof::util::path_as_slices_hex_to_ascii` and `replication::utils::path_to_string`
--> grovedb/src/operations/get/mod.rs:26:5
|
26 | operations::proof::util::path_as_slices_hex_to_ascii, replication::utils::path_to_string,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
elided lifetime has a name:
grovedb/src/batch/mod.rs#L2292
warning: elided lifetime has a name
--> grovedb/src/batch/mod.rs:2292:26
|
2286 | pub fn open_batch_merk_at_path<'a, B: AsRef<[u8]>>(
| -- lifetime `'a` declared here
...
2292 | ) -> CostResult<Merk<PrefixedRocksDbStorageContext>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'a`
|
= note: `#[warn(elided_named_lifetimes)]` 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#L796
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> merk/src/estimated_costs/average_case_costs.rs:796:24
|
796 | 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#L525
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> merk/src/estimated_costs/average_case_costs.rs:525:24
|
525 | 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
|
this function has too many arguments (9/7):
merk/src/tree/mod.rs#L942
warning: this function has too many arguments (9/7)
--> merk/src/tree/mod.rs:942:5
|
942 | / pub fn put_value_with_reference_value_hash_and_value_cost(
943 | | mut self,
944 | | value: Vec<u8>,
945 | | value_hash: CryptoHash,
... |
968 | | >,
969 | | ) -> 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#L884
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:884:5
|
884 | / pub fn put_value_and_reference_value_hash(
885 | | mut self,
886 | | value: Vec<u8>,
887 | | value_hash: CryptoHash,
... |
909 | | >,
910 | | ) -> 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#L828
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:828:5
|
828 | / pub fn put_value_with_fixed_cost(
829 | | mut self,
830 | | value: Vec<u8>,
831 | | value_fixed_cost: u32,
... |
853 | | >,
854 | | ) -> 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#L691
warning: this function has too many arguments (8/7)
--> merk/src/merk/mod.rs:691:5
|
691 | / fn verify_link(
692 | | &self,
693 | | link: &Link,
694 | | parent_key: &[u8],
... |
699 | | grove_version: &GroveVersion,
700 | | ) {
| |_____^
|
= 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#L631
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:631:10
|
631 | ) -> (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#L191
warning: the following explicit lifetimes could be elided: 'a
--> merk/src/merk/mod.rs:191:6
|
191 | 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
|
191 - impl<'a, I: RawIterator> KVIterator<'a, I> {
191 + 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
|
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<'_> {
|
|
using `clone` on type `CompactBytesIter<'_>` which implements the `Copy` trait:
path/src/subtree_path_iter.rs#L155
warning: using `clone` on type `CompactBytesIter<'_>` which implements the `Copy` trait
--> path/src/subtree_path_iter.rs:155:89
|
155 | CurrentSubtreePathIter::OwnedBytes(x) => CurrentSubtreePathIter::OwnedBytes(x.clone()),
| ^^^^^^^^^ help: try dereferencing it: `*x`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
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#L159
warning: the following explicit lifetimes could be elided: 'b
--> path/src/subtree_path.rs:159:6
|
159 | 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
|
159 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> {
159 + impl<B: AsRef<[u8]>> Hash for SubtreePath<'_, B> {
|
|
the following explicit lifetimes could be elided: 'b:
path/src/subtree_path.rs#L129
warning: the following explicit lifetimes could be elided: 'b
--> path/src/subtree_path.rs:129:6
|
129 | 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
|
129 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {}
129 + impl<B: AsRef<[u8]>> Eq for SubtreePath<'_, B> {}
|
|
the following explicit lifetimes could be elided: 'bl:
path/src/subtree_path.rs#L117
warning: the following explicit lifetimes could be elided: 'bl
--> path/src/subtree_path.rs:117:6
|
117 | 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
help: elide the lifetimes
|
117 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL>
117 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'_, BL>
|
|
the following explicit lifetimes could be elided: 'b:
path/src/subtree_path.rs#L71
warning: the following explicit lifetimes could be elided: 'b
--> path/src/subtree_path.rs:71:6
|
71 | impl<'b, B: AsRef<[u8]>> Display for SubtreePath<'b, B> {
| ^^ ^^
|
= 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
|
71 - impl<'b, B: AsRef<[u8]>> Display for SubtreePath<'b, B> {
71 + impl<B: AsRef<[u8]>> Display for SubtreePath<'_, B> {
|
|
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
|