feat: big sum trees and count trees #475
Annotations
1 error and 104 warnings
self-assignment of `*aggregate_data` to `*aggregate_data`:
grovedb/src/batch/mod.rs#L1848
error: self-assignment of `*aggregate_data` to `*aggregate_data`
--> grovedb/src/batch/mod.rs:1848:53
|
1848 | ... *aggregate_data = *aggregate_data;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#self_assignment
= note: `#[deny(clippy::self_assignment)]` on by default
|
this function has too many arguments (8/7):
grovedb/src/lib.rs#L1332
warning: this function has too many arguments (8/7)
--> grovedb/src/lib.rs:1332:5
|
1332 | / fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>(
1333 | | &'db self,
1334 | | merk: Merk<S>,
1335 | | path: &SubtreePath<B>,
... |
1340 | | grove_version: &GroveVersion,
1341 | | ) -> Result<VerificationIssues, 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:
grovedb/src/query/mod.rs#L512
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/query/mod.rs:512:6
|
512 | impl<'a> fmt::Display for SinglePathSubquery<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
512 - impl<'a> fmt::Display for SinglePathSubquery<'a> {
512 + impl fmt::Display for SinglePathSubquery<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
grovedb/src/query/mod.rs#L483
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/query/mod.rs:483:6
|
483 | impl<'a> HasSubquery<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
483 - impl<'a> HasSubquery<'a> {
483 + impl HasSubquery<'_> {
|
|
the following explicit lifetimes could be elided: 'a:
grovedb/src/query/mod.rs#L467
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/query/mod.rs:467:6
|
467 | impl<'a> fmt::Display for HasSubquery<'a> {
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
467 - impl<'a> fmt::Display for HasSubquery<'a> {
467 + impl fmt::Display for HasSubquery<'_> {
|
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/verify.rs#L374
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/verify.rs:374:25
|
374 | limit_left.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = limit_left.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/verify.rs#L293
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/verify.rs:293:17
|
293 | limit_left.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = limit_left.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
|
this function has too many arguments (8/7):
grovedb/src/operations/proof/verify.rs#L229
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/proof/verify.rs:229:5
|
229 | / fn verify_layer_proof<T>(
230 | | layer_proof: &LayerProof,
231 | | prove_options: &ProveOptions,
232 | | query: &PathQuery,
... |
237 | | grove_version: &GroveVersion,
238 | | ) -> Result<CryptoHash, 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):
grovedb/src/operations/insert/mod.rs#L217
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/insert/mod.rs:217:5
|
217 | / fn add_element_on_transaction<'db, B: AsRef<[u8]>>(
218 | | &'db self,
219 | | path: SubtreePath<B>,
220 | | key: &[u8],
... |
225 | | grove_version: &GroveVersion,
226 | | ) -> CostResult<Merk<PrefixedRocksDbTransactionContext<'db>>, 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):
grovedb/src/operations/insert/mod.rs#L117
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/insert/mod.rs:117:5
|
117 | / fn insert_on_transaction<'db, 'b, B: AsRef<[u8]>>(
118 | | &self,
119 | | path: SubtreePath<'b, B>,
120 | | key: &[u8],
... |
125 | | grove_version: &GroveVersion,
126 | | ) -> 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):
grovedb/src/operations/get/query.rs#L582
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/get/query.rs:582:5
|
582 | / pub fn query_raw(
583 | | &self,
584 | | path_query: &PathQuery,
585 | | allow_cache: bool,
... |
590 | | grove_version: &GroveVersion,
591 | | ) -> CostResult<(QueryResultElements, u16), 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):
grovedb/src/operations/get/query.rs#L243
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/get/query.rs:243:5
|
243 | / pub fn query(
244 | | &self,
245 | | path_query: &PathQuery,
246 | | allow_cache: bool,
... |
251 | | grove_version: &GroveVersion,
252 | | ) -> CostResult<(QueryResultElements, u16), 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):
grovedb/src/operations/get/query.rs#L121
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/get/query.rs:121:5
|
121 | / pub fn query_many_raw(
122 | | &self,
123 | | path_queries: &[&PathQuery],
124 | | allow_cache: bool,
... |
129 | | grove_version: &GroveVersion,
130 | | ) -> CostResult<QueryResultElements, 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):
grovedb/src/operations/delete/mod.rs#L670
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/mod.rs:670:5
|
670 | / fn delete_internal_on_transaction<B: AsRef<[u8]>>(
671 | | &self,
672 | | path: SubtreePath<B>,
673 | | key: &[u8],
... |
685 | | grove_version: &GroveVersion,
686 | | ) -> CostResult<bool, 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):
grovedb/src/operations/delete/mod.rs#L631
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/mod.rs:631:5
|
631 | / fn delete_internal<B: AsRef<[u8]>>(
632 | | &self,
633 | | path: SubtreePath<B>,
634 | | key: &[u8],
... |
646 | | grove_version: &GroveVersion,
647 | | ) -> CostResult<bool, 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):
grovedb/src/operations/delete/mod.rs#L510
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/mod.rs:510:5
|
510 | / pub fn delete_operation_for_delete_internal<B: AsRef<[u8]>>(
511 | | &self,
512 | | path: SubtreePath<B>,
513 | | key: &[u8],
... |
518 | | grove_version: &GroveVersion,
519 | | ) -> CostResult<Option<QualifiedGroveDbOp>, 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):
grovedb/src/operations/delete/worst_case.rs#L115
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/worst_case.rs:115:5
|
115 | / pub fn worst_case_delete_operation_for_delete<'db, S: Storage<'db>>(
116 | | path: &KeyInfoPath,
117 | | key: &KeyInfo,
118 | | in_parent_tree_type: TreeType,
... |
123 | | grove_version: &GroveVersion,
124 | | ) -> CostResult<QualifiedGroveDbOp, 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):
grovedb/src/operations/delete/delete_up_tree.rs#L200
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/delete_up_tree.rs:200:5
|
200 | / pub fn add_delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
201 | | &self,
202 | | path: SubtreePath<B>,
203 | | key: &[u8],
... |
208 | | grove_version: &GroveVersion,
209 | | ) -> CostResult<Option<Vec<QualifiedGroveDbOp>>, 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):
grovedb/src/operations/delete/delete_up_tree.rs#L168
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/delete_up_tree.rs:168:5
|
168 | / pub fn delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
169 | | &self,
170 | | path: SubtreePath<B>,
171 | | key: &[u8],
... |
176 | | grove_version: &GroveVersion,
177 | | ) -> CostResult<Vec<QualifiedGroveDbOp>, 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):
grovedb/src/operations/delete/average_case.rs#L140
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/average_case.rs:140:5
|
140 | / pub fn average_case_delete_operation_for_delete<'db, S: Storage<'db>>(
141 | | path: &KeyInfoPath,
142 | | key: &KeyInfo,
143 | | in_parent_tree_type: TreeType,
... |
148 | | grove_version: &GroveVersion,
149 | | ) -> CostResult<QualifiedGroveDbOp, 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 (12/7):
grovedb/src/element/query.rs#L734
warning: this function has too many arguments (12/7)
--> grovedb/src/element/query.rs:734:5
|
734 | / fn query_item(
735 | | storage: &RocksDbStorage,
736 | | item: &QueryItem,
737 | | results: &mut Vec<QueryResultElement>,
... |
746 | | grove_version: &GroveVersion,
747 | | ) -> 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):
grovedb/src/element/query.rs#L307
warning: this function has too many arguments (8/7)
--> grovedb/src/element/query.rs:307:5
|
307 | / pub fn get_query_apply_function(
308 | | storage: &RocksDbStorage,
309 | | path: &[&[u8]],
310 | | sized_query: &SizedQuery,
... |
315 | | grove_version: &GroveVersion,
316 | | ) -> CostResult<(QueryResultElements, u16), 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:
grovedb/src/element/query.rs#L177
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/element/query.rs:177:17
|
177 | impl<'db, 'ctx, 'a> fmt::Display for PathQueryPushArgs<'db, 'ctx, 'a>
| ^^ ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
177 - impl<'db, 'ctx, 'a> fmt::Display for PathQueryPushArgs<'db, 'ctx, 'a>
177 + impl<'db, 'ctx> fmt::Display for PathQueryPushArgs<'db, 'ctx, '_>
|
|
this `let...else` may be rewritten with the `?` operator:
grovedb/src/element/helpers.rs#L500
warning: this `let...else` may be rewritten with the `?` operator
--> grovedb/src/element/helpers.rs:500:9
|
500 | / let Some(value_cost) = self.get_specialized_cost(grove_version).ok() else {
501 | | return None;
502 | | };
| |__________^ help: replace it with: `let value_cost = self.get_specialized_cost(grove_version).ok()?;`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark
= note: `#[warn(clippy::question_mark)]` on by default
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
grovedb/src/element/helpers.rs#L393
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> grovedb/src/element/helpers.rs:393:14
|
393 | key: &Vec<u8>,
| ^^^^^^^^ help: change this to: `&[u8]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
|
accessing first element with `key.as_ref().get(0)`:
grovedb/src/element/get.rs#L44
warning: accessing first element with `key.as_ref().get(0)`
--> grovedb/src/element/get.rs:44:49
|
44 | format!("({} in decimal) ", key.as_ref().get(0).unwrap())
| ^^^^^^^^^^^^^^^^^^^ help: try: `key.as_ref().first()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: `#[warn(clippy::get_first)]` on by default
|
this function has too many arguments (8/7):
grovedb/src/batch/mod.rs#L2512
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:2512:5
|
2512 | / pub fn apply_partial_batch_with_element_flags_update(
2513 | | &self,
2514 | | ops: Vec<QualifiedGroveDbOp>,
2515 | | batch_apply_options: Option<BatchApplyOptions>,
... |
2534 | | grove_version: &GroveVersion,
2535 | | ) -> 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):
grovedb/src/batch/mod.rs#L2031
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:2031:5
|
2031 | / fn continue_partial_apply_body<'db, S: StorageContext<'db>>(
2032 | | &self,
2033 | | previous_leftover_operations: Option<OpsByLevelPath>,
2034 | | additional_ops: Vec<QualifiedGroveDbOp>,
... |
2050 | | grove_version: &GroveVersion,
2051 | | ) -> CostResult<Option<OpsByLevelPath>, Error> {
| |__________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1957
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1957:37
|
1957 | / ... GroveOp::ReplaceTreeRootKey {
1958 | | ... hash: root_hash,
1959 | | ... root_key: calculated_root_key,
1960 | | ... aggregate_data,
1961 | | ... }
1962 | | ... .into(),
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1957 ~ GroveOp::ReplaceTreeRootKey {
1958 + hash: root_hash,
1959 + root_key: calculated_root_key,
1960 + aggregate_data,
1961 ~ },
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1907
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1907:61
|
1907 | / ... GroveOp::InsertTreeWithRootHash {
1908 | | ... hash: root_hash,
1909 | | ... root_key: calculated_root_key,
1910 | | ... flags: flags.clone(),
1911 | | ... aggregate_data,
1912 | | ... }
1913 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1907 ~ GroveOp::InsertTreeWithRootHash {
1908 + hash: root_hash,
1909 + root_key: calculated_root_key,
1910 + flags: flags.clone(),
1911 + aggregate_data,
1912 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1896
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1896:61
|
1896 | / ... GroveOp::InsertTreeWithRootHash {
1897 | | ... hash: root_hash,
1898 | | ... root_key: calculated_root_key,
1899 | | ... flags: flags.clone(),
1900 | | ... aggregate_data,
1901 | | ... }
1902 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1896 ~ GroveOp::InsertTreeWithRootHash {
1897 + hash: root_hash,
1898 + root_key: calculated_root_key,
1899 + flags: flags.clone(),
1900 + aggregate_data,
1901 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1885
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1885:61
|
1885 | / ... GroveOp::InsertTreeWithRootHash {
1886 | | ... hash: root_hash,
1887 | | ... root_key: calculated_root_key,
1888 | | ... flags: flags.clone(),
1889 | | ... aggregate_data,
1890 | | ... }
1891 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1885 ~ GroveOp::InsertTreeWithRootHash {
1886 + hash: root_hash,
1887 + root_key: calculated_root_key,
1888 + flags: flags.clone(),
1889 + aggregate_data,
1890 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1874
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1874:61
|
1874 | / ... GroveOp::InsertTreeWithRootHash {
1875 | | ... hash: root_hash,
1876 | | ... root_key: calculated_root_key,
1877 | | ... flags: flags.clone(),
1878 | | ... aggregate_data,
1879 | | ... }
1880 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1874 ~ GroveOp::InsertTreeWithRootHash {
1875 + hash: root_hash,
1876 + root_key: calculated_root_key,
1877 + flags: flags.clone(),
1878 + aggregate_data,
1879 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1862
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1862:61
|
1862 | / ... GroveOp::InsertTreeWithRootHash {
1863 | | ... hash: root_hash,
1864 | | ... root_key: calculated_root_key,
1865 | | ... flags: flags.clone(),
... |
1868 | | ... }
1869 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1862 ~ GroveOp::InsertTreeWithRootHash {
1863 + hash: root_hash,
1864 + root_key: calculated_root_key,
1865 + flags: flags.clone(),
1866 + aggregate_data:
1867 + AggregateData::NoAggregateData,
1868 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1830
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1830:49
|
1830 | / ... GroveOp::ReplaceTreeRootKey {
1831 | | ... hash: root_hash,
1832 | | ... root_key: calculated_root_key,
1833 | | ... aggregate_data,
1834 | | ... }
1835 | | ... .into(),
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
help: consider removing `.into()`
|
1830 ~ GroveOp::ReplaceTreeRootKey {
1831 + hash: root_hash,
1832 + root_key: calculated_root_key,
1833 + aggregate_data,
1834 ~ },
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
grovedb/src/batch/mod.rs#L1532
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> grovedb/src/batch/mod.rs:1532:29
|
1532 | ... &merk,
| ^^^^^ help: change this to: `merk`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
returning the result of a `let` binding from a block:
grovedb/src/batch/mod.rs#L1721
warning: returning the result of a `let` binding from a block
--> grovedb/src/batch/mod.rs:1721:9
|
1716 | / let r = merk
1717 | | .root_hash_key_and_aggregate_data()
1718 | | .add_cost(cost)
1719 | | .map_err(Error::MerkError);
| |_______________________________________- unnecessary `let` binding
1720 |
1721 | r
| ^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return
= note: `#[warn(clippy::let_and_return)]` on by default
help: return the expression directly
|
1716 ~
1717 |
1718 ~ merk
1719 + .root_hash_key_and_aggregate_data()
1720 + .add_cost(cost)
1721 + .map_err(Error::MerkError)
|
|
this function has too many arguments (9/7):
grovedb/src/batch/mod.rs#L963
warning: this function has too many arguments (9/7)
--> grovedb/src/batch/mod.rs:963:5
|
963 | / fn process_reference_with_hop_count_greater_than_one<'a, G, SR>(
964 | | &'a mut self,
965 | | key: &[u8],
966 | | reference_path: &[Vec<u8>],
... |
972 | | grove_version: &GroveVersion,
973 | | ) -> CostResult<CryptoHash, 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:
grovedb/src/batch/mod.rs#L873
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/batch/mod.rs:873:47
|
873 | fn get_and_deserialize_referenced_element<'a>(
| ^^
874 | &'a mut self,
| ^^
|
= 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
|
873 ~ fn get_and_deserialize_referenced_element(
874 ~ &mut self,
|
|
this function has too many arguments (8/7):
grovedb/src/batch/mod.rs#L745
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:745:5
|
745 | / fn process_reference<'a, G, SR>(
746 | | &'a mut self,
747 | | qualified_path: &[Vec<u8>],
748 | | ops_by_qualified_paths: &'a BTreeMap<Vec<Vec<u8>>, GroveOp>,
... |
753 | | grove_version: &GroveVersion,
754 | | ) -> CostResult<CryptoHash, Error>
| |______________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
doc list item without indentation:
grovedb/src/batch/mod.rs#L732
warning: doc list item without indentation
--> grovedb/src/batch/mod.rs:732:9
|
732 | /// missing reference, corrupted data, or invalid batch operation.
| ^
|
= 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
help: indent this line
|
732 | /// missing reference, corrupted data, or invalid batch operation.
| ++
|
doc list item without indentation:
grovedb/src/batch/mod.rs#L728
warning: doc list item without indentation
--> grovedb/src/batch/mod.rs:728:9
|
728 | /// associated cost, if successful.
| ^
|
= 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
help: indent this line
|
728 | /// associated cost, if successful.
| ++
|
doc list item without indentation:
grovedb/src/batch/mod.rs#L715
warning: doc list item without indentation
--> grovedb/src/batch/mod.rs:715:9
|
715 | /// element.
| ^
|
= 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
help: indent this line
|
715 | /// element.
| +++
|
doc list item without indentation:
grovedb/src/batch/mod.rs#L714
warning: doc list item without indentation
--> grovedb/src/batch/mod.rs:714:9
|
714 | /// element and then determines the next step based on the type of the
| ^
|
= 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
help: indent this line
|
714 | /// element and then determines the next step based on the type of the
| +++
|
doc list item without indentation:
grovedb/src/batch/mod.rs#L711
warning: doc list item without indentation
--> grovedb/src/batch/mod.rs:711:9
|
711 | /// value hash from the reference element.
| ^
|
= 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
|
711 | /// value hash from the reference element.
| +++
|
this function has too many arguments (8/7):
grovedb/src/batch/mod.rs#L681
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:681:5
|
681 | / fn execute_ops_on_path(
682 | | &mut self,
683 | | path: &KeyInfoPath,
684 | | ops_at_path_by_key: BTreeMap<KeyInfo, GroveOp>,
... |
689 | | grove_version: &GroveVersion,
690 | | ) -> CostResult<RootHashKeyAndAggregateData, Error>;
| |_______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this expression creates a reference which is immediately dereferenced by the compiler:
grovedb/src/batch/just_in_time_reference_update.rs#L63
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> grovedb/src/batch/just_in_time_reference_update.rs:63:47
|
63 | let val_hash = value_hash(&serialized).unwrap_add_cost(&mut cost);
| ^^^^^^^^^^^ help: change this to: `serialized`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
this function has too many arguments (9/7):
grovedb/src/batch/just_in_time_reference_update.rs#L29
warning: this function has too many arguments (9/7)
--> grovedb/src/batch/just_in_time_reference_update.rs:29:5
|
29 | / pub(crate) fn process_old_element_flags<G, SR>(
30 | | key: &[u8],
31 | | serialized: &[u8],
32 | | new_element: &mut Element,
... |
38 | | grove_version: &GroveVersion,
39 | | ) -> CostResult<CryptoHash, 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
|
usage of `contains_key` followed by `insert` on a `HashMap`:
grovedb/src/batch/estimated_costs/average_case_costs.rs#L269
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> grovedb/src/batch/estimated_costs/average_case_costs.rs:269:13
|
269 | / if !self.cached_merks.contains_key(&base_path) {
270 | | cost_return_on_error_no_add!(
271 | | &cost,
272 | | GroveDb::add_average_case_get_merk_at_path::<RocksDbStorage>(
... |
283 | | .insert(base_path, estimated_layer_info.tree_type);
284 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
= note: `#[warn(clippy::map_entry)]` on by default
help: try
|
269 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.cached_merks.entry(base_path) {
270 + cost_return_on_error_no_add!(
271 + &cost,
272 + GroveDb::add_average_case_get_merk_at_path::<RocksDbStorage>(
273 + &mut cost,
274 + &base_path,
275 + estimated_layer_info
276 + .estimated_layer_count
277 + .estimated_to_be_empty(),
278 + estimated_layer_info.tree_type,
279 + grove_version
280 + )
281 + );
282 + e.insert(estimated_layer_info.tree_type);
283 + }
|
|
unnecessary use of `get(path).is_none()`:
grovedb/src/batch/estimated_costs/average_case_costs.rs#L215
warning: unnecessary use of `get(path).is_none()`
--> grovedb/src/batch/estimated_costs/average_case_costs.rs:215:30
|
215 | if self.cached_merks.get(path).is_none() {
| ------------------^^^^^^^^^^^^^^^^^^^
| |
| help: replace it with: `!self.cached_merks.contains_key(path)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check
= note: `#[warn(clippy::unnecessary_get_then_check)]` on by default
|
variants `Execute`, `AverageCase`, and `WorstCase` are never constructed:
grovedb/src/batch/mode.rs#L18
warning: variants `Execute`, `AverageCase`, and `WorstCase` are never constructed
--> grovedb/src/batch/mode.rs:18:5
|
17 | pub enum BatchRunMode {
| ------------ variants in this enum
18 | Execute,
| ^^^^^^^
19 | #[cfg(feature = "estimated_costs")]
20 | AverageCase(HashMap<KeyInfoPath, EstimatedLayerInformation>),
| ^^^^^^^^^^^
21 | #[cfg(feature = "estimated_costs")]
22 | WorstCase(HashMap<KeyInfoPath, WorstCaseLayerInformation>),
| ^^^^^^^^^
|
= note: `BatchRunMode` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis
|
method `get_batch_run_mode` is never used:
grovedb/src/batch/mod.rs#L678
warning: method `get_batch_run_mode` is never used
--> grovedb/src/batch/mod.rs:678:8
|
675 | trait TreeCache<G, SR> {
| --------- method in this trait
...
678 | fn get_batch_run_mode(&self) -> BatchRunMode;
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
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`
|
unexpected `cfg` condition value: `test_utils`:
grovedb/src/element/insert.rs#L483
warning: unexpected `cfg` condition value: `test_utils`
--> grovedb/src/element/insert.rs:483:32
|
483 | #[cfg(all(feature = "minimal", feature = "test_utils"))]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `axum`, `default`, `estimated_costs`, `full`, `grovedb-costs`, `grovedb-merk`, `grovedb-storage`, `grovedb-visualize`, `grovedbg`, `grovedbg-types`, `integer-encoding`, `intmap`, `itertools`, `minimal`, `proof_debug`, `serde`, `tempfile`, `thiserror`, `tokio`, `tokio-util`, `tower-http`, `verify`, `visualize`, and `zip-extensions`
= help: consider adding `test_utils` as a feature in `Cargo.toml`
= 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:
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
|
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#L797
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> merk/src/estimated_costs/average_case_costs.rs:797:24
|
797 | 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#L526
warning: casting to the same type is unnecessary (`u32` -> `u32`)
--> merk/src/estimated_costs/average_case_costs.rs:526:24
|
526 | 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#L943
warning: this function has too many arguments (9/7)
--> merk/src/tree/mod.rs:943:5
|
943 | / pub fn put_value_with_reference_value_hash_and_value_cost(
944 | | mut self,
945 | | value: Vec<u8>,
946 | | value_hash: CryptoHash,
... |
969 | | >,
970 | | ) -> 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#L885
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:885:5
|
885 | / pub fn put_value_and_reference_value_hash(
886 | | mut self,
887 | | value: Vec<u8>,
888 | | value_hash: CryptoHash,
... |
910 | | >,
911 | | ) -> 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#L829
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:829:5
|
829 | / pub fn put_value_with_fixed_cost(
830 | | mut self,
831 | | value: Vec<u8>,
832 | | value_fixed_cost: u32,
... |
854 | | >,
855 | | ) -> 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#L462
warning: casting integer literal to `u32` is unnecessary
--> merk/src/tree/mod.rs:462:49
|
462 | 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#L690
warning: this function has too many arguments (8/7)
--> merk/src/merk/mod.rs:690:5
|
690 | / fn verify_link(
691 | | &self,
692 | | link: &Link,
693 | | parent_key: &[u8],
... |
698 | | grove_version: &GroveVersion,
699 | | ) {
| |_____^
|
= 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#L630
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:630:10
|
630 | ) -> (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#L190
warning: the following explicit lifetimes could be elided: 'a
--> merk/src/merk/mod.rs:190:6
|
190 | 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
|
190 - impl<'a, I: RawIterator> KVIterator<'a, I> {
190 + 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#L418
warning: method `attempt_state_recovery` is never used
--> merk/src/merk/restore.rs:418:8
|
68 | impl<'db, S: StorageContext<'db>> Restorer<S> {
| --------------------------------------------- method in this implementation
...
418 | 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: '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: '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
|