fix/refactor: atomicity and caching #347
clippy
108 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 108 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0 (9fc6b4312 2025-01-07)
- cargo 1.84.0 (66221abde 2024-11-19)
- clippy 0.1.84 (9fc6b43126 2025-01-07)
Annotations
Check warning on line 1001 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:992:5
|
992 | / fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>(
993 | | &'db self,
994 | | merk: Merk<S>,
995 | | path: &SubtreePath<B>,
... |
1000 | | grove_version: &GroveVersion,
1001 | | ) -> Result<VerificationIssues, Error> {
| |__________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 303 in grovedb/src/lib.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'b
warning: the following explicit lifetimes could be elided: 'b
--> grovedb/src/lib.rs:303:37
|
303 | fn parent_key_not_found<'b, B: AsRef<[u8]>>(
| ^^
304 | e: Error,
305 | parent_path: SubtreePath<'b, B>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
303 ~ fn parent_key_not_found<B: AsRef<[u8]>>(
304 | e: Error,
305 ~ parent_path: SubtreePath<'_, B>,
|
Check warning on line 91 in grovedb/src/util/compat.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'b
warning: the following explicit lifetimes could be elided: 'b
--> grovedb/src/util/compat.rs:91:33
|
91 | fn parent_key_not_found<'b, B: AsRef<[u8]>>(
| ^^
92 | e: Error,
93 | _parent_path: SubtreePath<'b, B>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
91 ~ fn parent_key_not_found<B: AsRef<[u8]>>(
92 | e: Error,
93 ~ _parent_path: SubtreePath<'_, B>,
|
Check warning on line 13 in grovedb/src/util/compat.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'b
warning: the following explicit lifetimes could be elided: 'b
--> grovedb/src/util/compat.rs:13:29
|
13 | fn parent_key_not_found<'b, B: AsRef<[u8]>>(
| ^^
14 | e: Error,
15 | parent_path: SubtreePath<'b, B>,
| ^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
help: elide the lifetimes
|
13 ~ fn parent_key_not_found<B: AsRef<[u8]>>(
14 | e: Error,
15 ~ parent_path: SubtreePath<'_, B>,
|
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 373 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:373:25
|
373 | 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 292 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:292:17
|
292 | 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 237 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:228:5
|
228 | / fn verify_layer_proof<T>(
229 | | layer_proof: &LayerProof,
230 | | prove_options: &ProveOptions,
231 | | query: &PathQuery,
... |
236 | | grove_version: &GroveVersion,
237 | | ) -> 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 178 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:169:5
|
169 | / fn add_element_on_transaction<'db, B: AsRef<[u8]>>(
170 | | &'db self,
171 | | path: SubtreePath<B>,
172 | | key: &[u8],
... |
177 | | grove_version: &GroveVersion,
178 | | ) -> 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 122 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:113:5
|
113 | / fn insert_on_transaction<'db, 'b, B: AsRef<[u8]>>(
114 | | &self,
115 | | path: SubtreePath<'b, B>,
116 | | key: &[u8],
... |
121 | | grove_version: &GroveVersion,
122 | | ) -> CostResult<(), Error> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 589 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:580:5
|
580 | / pub fn query_raw(
581 | | &self,
582 | | path_query: &PathQuery,
583 | | allow_cache: bool,
... |
588 | | grove_version: &GroveVersion,
589 | | ) -> 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 250 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:241:5
|
241 | / pub fn query(
242 | | &self,
243 | | path_query: &PathQuery,
244 | | allow_cache: bool,
... |
249 | | grove_version: &GroveVersion,
250 | | ) -> 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 128 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:119:5
|
119 | / pub fn query_many_raw(
120 | | &self,
121 | | path_queries: &[&PathQuery],
122 | | allow_cache: bool,
... |
127 | | grove_version: &GroveVersion,
128 | | ) -> 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 604 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:588:5
|
588 | / fn delete_internal_on_transaction<B: AsRef<[u8]>>(
589 | | &self,
590 | | path: SubtreePath<B>,
591 | | key: &[u8],
... |
603 | | grove_version: &GroveVersion,
604 | | ) -> 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 476 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:467:5
|
467 | / fn delete_operation_for_delete_internal<B: AsRef<[u8]>>(
468 | | &self,
469 | | path: SubtreePath<B>,
470 | | key: &[u8],
... |
475 | | grove_version: &GroveVersion,
476 | | ) -> 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 122 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:113:5
|
113 | / pub fn worst_case_delete_operation_for_delete<'db, S: Storage<'db>>(
114 | | path: &KeyInfoPath,
115 | | key: &KeyInfo,
116 | | in_parent_tree_type: TreeType,
... |
121 | | grove_version: &GroveVersion,
122 | | ) -> 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 207 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:198:5
|
198 | / pub fn add_delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
199 | | &self,
200 | | path: SubtreePath<B>,
201 | | key: &[u8],
... |
206 | | grove_version: &GroveVersion,
207 | | ) -> 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 175 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:166:5
|
166 | / pub fn delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
167 | | &self,
168 | | path: SubtreePath<B>,
169 | | key: &[u8],
... |
174 | | grove_version: &GroveVersion,
175 | | ) -> 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 147 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:138:5
|
138 | / pub fn average_case_delete_operation_for_delete<'db, S: Storage<'db>>(
139 | | path: &KeyInfoPath,
140 | | key: &KeyInfo,
141 | | in_parent_tree_type: TreeType,
... |
146 | | grove_version: &GroveVersion,
147 | | ) -> 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 720 in grovedb/src/element/query.rs
github-actions / clippy
this function has too many arguments (12/7)
warning: this function has too many arguments (12/7)
--> grovedb/src/element/query.rs:707:5
|
707 | / fn query_item(
708 | | storage: &RocksDbStorage,
709 | | item: &QueryItem,
710 | | results: &mut Vec<QueryResultElement>,
... |
719 | | grove_version: &GroveVersion,
720 | | ) -> CostResult<(), Error> {
| |______________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
Check warning on line 311 in grovedb/src/element/query.rs
github-actions / clippy
this function has too many arguments (8/7)
warning: this function has too many arguments (8/7)
--> grovedb/src/element/query.rs:302:5
|
302 | / pub fn get_query_apply_function(
303 | | storage: &RocksDbStorage,
304 | | path: &[&[u8]],
305 | | sized_query: &SizedQuery,
... |
310 | | grove_version: &GroveVersion,
311 | | ) -> 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 172 in grovedb/src/element/query.rs
github-actions / clippy
the following explicit lifetimes could be elided: 'a
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/element/query.rs:172:17
|
172 | 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
|
172 - impl<'db, 'ctx, 'a> fmt::Display for PathQueryPushArgs<'db, 'ctx, 'a>
172 + impl<'db, 'ctx> fmt::Display for PathQueryPushArgs<'db, 'ctx, '_>
|
Check warning on line 502 in grovedb/src/element/helpers.rs
github-actions / clippy
this `let...else` may be rewritten with the `?` operator
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