feat: state sync optimization #659
clippy
109 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 109 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.83.0 (90b35a623 2024-11-26)
- cargo 1.83.0 (5ffbef321 2024-10-29)
- clippy 0.1.83 (90b35a6 2024-11-26)
Annotations
Check warning on line 1224 in grovedb/src/lib.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/lib.rs:1215:5
|
1215 | / fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>(
1216 | | &'db self,
1217 | | merk: Merk<S>,
1218 | | path: &SubtreePath<B>,
... |
1223 | | grove_version: &GroveVersion,
1224 | | ) -> Result<HashMap<Vec<Vec<u8>>, (CryptoHash, CryptoHash, CryptoHash)>, Error> {
| |___________________________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 1224 in grovedb/src/lib.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:1224:10
|
1224 | ) -> Result<HashMap<Vec<Vec<u8>>, (CryptoHash, CryptoHash, CryptoHash)>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 1080 in grovedb/src/lib.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:1080:10
|
1080 | ) -> Result<HashMap<Vec<Vec<u8>>, (CryptoHash, CryptoHash, CryptoHash)>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 1036 in grovedb/src/lib.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:1036:10
|
1036 | ) -> Result<HashMap<Vec<Vec<u8>>, (CryptoHash, CryptoHash, CryptoHash)>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 391 in grovedb/src/lib.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:384:10
|
384 | ) -> Result<
| __________^
385 | | (
386 | | Merk<PrefixedRocksDbImmediateStorageContext<'tx>>,
387 | | Option<Vec<u8>>,
... |
390 | | Error,
391 | | >
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
Check warning on line 231 in grovedb/src/replication.rs
github-actions / clippy
very complex type used. Consider factoring parts into `type` definitions
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/replication.rs:231:6
|
231 | ) -> Result<(crate::SubtreePrefix, Option<Vec<u8>>, bool, Vec<u8>), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
= note: `#[warn(clippy::type_complexity)]` on by default
Check warning on line 41 in grovedb/src/replication/state_sync_session.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'db
warning: the following explicit lifetimes could be elided: 'db
--> grovedb/src/replication/state_sync_session.rs:41:6
|
41 | impl<'db> SubtreeStateSyncInfo<'db> {
| ^^^ ^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
41 - impl<'db> SubtreeStateSyncInfo<'db> {
41 + impl SubtreeStateSyncInfo<'_> {
|
Check warning on line 512 in grovedb/src/query/mod.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
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<'_> {
|
Check warning on line 483 in grovedb/src/query/mod.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
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<'_> {
|
Check warning on line 467 in grovedb/src/query/mod.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
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<'_> {
|
Check warning on line 367 in grovedb/src/operations/proof/verify.rs
github-actions / clippy
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/verify.rs:367:25
|
367 | 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
Check warning on line 293 in grovedb/src/operations/proof/verify.rs
github-actions / clippy
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
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
Check warning on line 238 in grovedb/src/operations/proof/verify.rs
github-actions / clippy
this function has too many arguments (8/7)
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
Check warning on line 226 in grovedb/src/operations/insert/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
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
Check warning on line 126 in grovedb/src/operations/insert/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
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
Check warning on line 551 in grovedb/src/operations/get/query.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/get/query.rs:542:5
|
542 | / pub fn query_raw(
543 | | &self,
544 | | path_query: &PathQuery,
545 | | allow_cache: bool,
... |
550 | | grove_version: &GroveVersion,
551 | | ) -> CostResult<(QueryResultElements, u16), Error> {
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 240 in grovedb/src/operations/get/query.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/get/query.rs:231:5
|
231 | / pub fn query(
232 | | &self,
233 | | path_query: &PathQuery,
234 | | allow_cache: bool,
... |
239 | | grove_version: &GroveVersion,
240 | | ) -> CostResult<(QueryResultElements, u16), Error> {
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 123 in grovedb/src/operations/get/query.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/get/query.rs:114:5
|
114 | / pub fn query_many_raw(
115 | | &self,
116 | | path_queries: &[&PathQuery],
117 | | allow_cache: bool,
... |
122 | | grove_version: &GroveVersion,
123 | | ) -> CostResult<QueryResultElements, Error>
| |_______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 689 in grovedb/src/operations/delete/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/mod.rs:673:5
|
673 | / fn delete_internal_on_transaction<B: AsRef<[u8]>>(
674 | | &self,
675 | | path: SubtreePath<B>,
676 | | key: &[u8],
... |
688 | | grove_version: &GroveVersion,
689 | | ) -> CostResult<bool, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 650 in grovedb/src/operations/delete/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/mod.rs:634:5
|
634 | / fn delete_internal<B: AsRef<[u8]>>(
635 | | &self,
636 | | path: SubtreePath<B>,
637 | | key: &[u8],
... |
649 | | grove_version: &GroveVersion,
650 | | ) -> CostResult<bool, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 518 in grovedb/src/operations/delete/mod.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/mod.rs:509:5
|
509 | / pub fn delete_operation_for_delete_internal<B: AsRef<[u8]>>(
510 | | &self,
511 | | path: SubtreePath<B>,
512 | | key: &[u8],
... |
517 | | grove_version: &GroveVersion,
518 | | ) -> CostResult<Option<QualifiedGroveDbOp>, Error> {
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 130 in grovedb/src/operations/delete/worst_case.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/worst_case.rs:121:5
|
121 | / pub fn worst_case_delete_operation_for_delete<'db, S: Storage<'db>>(
122 | | path: &KeyInfoPath,
123 | | key: &KeyInfo,
124 | | parent_tree_is_sum_tree: bool,
... |
129 | | grove_version: &GroveVersion,
130 | | ) -> CostResult<QualifiedGroveDbOp, Error> {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 208 in grovedb/src/operations/delete/delete_up_tree.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/delete_up_tree.rs:199:5
|
199 | / pub fn add_delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
200 | | &self,
201 | | path: SubtreePath<B>,
202 | | key: &[u8],
... |
207 | | grove_version: &GroveVersion,
208 | | ) -> CostResult<Option<Vec<QualifiedGroveDbOp>>, Error> {
| |___________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 176 in grovedb/src/operations/delete/delete_up_tree.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/delete_up_tree.rs:167:5
|
167 | / pub fn delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
168 | | &self,
169 | | path: SubtreePath<B>,
170 | | key: &[u8],
... |
175 | | grove_version: &GroveVersion,
176 | | ) -> CostResult<Vec<QualifiedGroveDbOp>, Error> {
| |___________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 148 in grovedb/src/operations/delete/average_case.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/operations/delete/average_case.rs:139:5
|
139 | / pub fn average_case_delete_operation_for_delete<'db, S: Storage<'db>>(
140 | | path: &KeyInfoPath,
141 | | key: &KeyInfo,
142 | | parent_tree_is_sum_tree: bool,
... |
147 | | grove_version: &GroveVersion,
148 | | ) -> CostResult<QualifiedGroveDbOp, Error> {
| |______________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments