fix!: just in time updates would break references in same batch #352
Annotations
66 warnings
this function has too many arguments (8/7):
grovedb/src/lib.rs#L1114
warning: this function has too many arguments (8/7)
--> grovedb/src/lib.rs:1114:5
|
1114 | / fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>(
1115 | | &'db self,
1116 | | merk: Merk<S>,
1117 | | path: &SubtreePath<B>,
... |
1122 | | grove_version: &GroveVersion,
1123 | | ) -> 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
|
very complex type used. Consider factoring parts into `type` definitions:
grovedb/src/lib.rs#L1123
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:1123:10
|
1123 | ) -> 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
|
very complex type used. Consider factoring parts into `type` definitions:
grovedb/src/lib.rs#L979
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:979:10
|
979 | ) -> 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
|
very complex type used. Consider factoring parts into `type` definitions:
grovedb/src/lib.rs#L935
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:935:10
|
935 | ) -> 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
= note: `#[warn(clippy::type_complexity)]` on by default
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L336
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:336:37
|
336 | map.entry(last).or_insert_with(Vec::new).push(element);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L286
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:286:37
|
286 | map.entry(last).or_insert_with(Vec::new).push(key);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/verify.rs#L367
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
|
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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`:
grovedb/src/operations/proof/util.rs#L309
warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> grovedb/src/operations/proof/util.rs:309:10
|
309 | path.into_iter()
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `#[warn(clippy::into_iter_on_ref)]` on by default
|
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#L542
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
|
this function has too many arguments (8/7):
grovedb/src/operations/get/query.rs#L231
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
|
this function has too many arguments (8/7):
grovedb/src/operations/get/query.rs#L114
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/mod.rs#L673
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/mod.rs#L634
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/mod.rs#L509
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/worst_case.rs#L121
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/delete_up_tree.rs#L199
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/delete_up_tree.rs#L167
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
|
this function has too many arguments (8/7):
grovedb/src/operations/delete/average_case.rs#L139
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
|
this function has too many arguments (12/7):
grovedb/src/element/query.rs#L727
warning: this function has too many arguments (12/7)
--> grovedb/src/element/query.rs:727:5
|
727 | / fn query_item(
728 | | storage: &RocksDbStorage,
729 | | item: &QueryItem,
730 | | results: &mut Vec<QueryResultElement>,
... |
739 | | grove_version: &GroveVersion,
740 | | ) -> 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#L300
warning: this function has too many arguments (8/7)
--> grovedb/src/element/query.rs:300:5
|
300 | / pub fn get_query_apply_function(
301 | | storage: &RocksDbStorage,
302 | | path: &[&[u8]],
303 | | sized_query: &SizedQuery,
... |
308 | | grove_version: &GroveVersion,
309 | | ) -> CostResult<(QueryResultElements, u16), Error> {
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this `let...else` may be rewritten with the `?` operator:
grovedb/src/element/helpers.rs#L323
warning: this `let...else` may be rewritten with the `?` operator
--> grovedb/src/element/helpers.rs:323:9
|
323 | / let Some(value_cost) = self.get_specialized_cost(grove_version).ok() else {
324 | | return None;
325 | | };
| |__________^ 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#L240
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> grovedb/src/element/helpers.rs:240:14
|
240 | 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
|
the borrowed expression implements the required traits:
grovedb/src/debugger.rs#L43
warning: the borrowed expression implements the required traits
--> grovedb/src/debugger.rs:43:34
|
43 | fs::write(&grovedbg_zip, &GROVEDBG_ZIP).expect("cannot crate grovedbg.zip");
| ^^^^^^^^^^^^^ help: change this to: `GROVEDBG_ZIP`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
= note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default
|
this function has too many arguments (8/7):
grovedb/src/batch/mod.rs#L2469
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:2469:5
|
2469 | / pub fn apply_partial_batch_with_element_flags_update(
2470 | | &self,
2471 | | ops: Vec<QualifiedGroveDbOp>,
2472 | | batch_apply_options: Option<BatchApplyOptions>,
... |
2491 | | grove_version: &GroveVersion,
2492 | | ) -> 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#L1997
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:1997:5
|
1997 | / fn continue_partial_apply_body<'db, S: StorageContext<'db>>(
1998 | | &self,
1999 | | previous_leftover_operations: Option<OpsByLevelPath>,
2000 | | additional_ops: Vec<QualifiedGroveDbOp>,
... |
2016 | | grove_version: &GroveVersion,
2017 | | ) -> 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#L1923
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1923:37
|
1923 | / ... GroveOp::ReplaceTreeRootKey {
1924 | | ... hash: root_hash,
1925 | | ... root_key: calculated_root_key,
1926 | | ... sum: sum_value,
1927 | | ... }
1928 | | ... .into(),
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1923 ~ GroveOp::ReplaceTreeRootKey {
1924 + hash: root_hash,
1925 + root_key: calculated_root_key,
1926 + sum: sum_value,
1927 ~ },
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1871
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1871:61
|
1871 | / ... GroveOp::InsertTreeWithRootHash {
1872 | | ... hash: root_hash,
1873 | | ... root_key: calculated_root_key,
1874 | | ... flags: flags.clone(),
1875 | | ... sum: sum_value,
1876 | | ... }
1877 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1871 ~ GroveOp::InsertTreeWithRootHash {
1872 + hash: root_hash,
1873 + root_key: calculated_root_key,
1874 + flags: flags.clone(),
1875 + sum: sum_value,
1876 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1860
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1860:61
|
1860 | / ... GroveOp::InsertTreeWithRootHash {
1861 | | ... hash: root_hash,
1862 | | ... root_key: calculated_root_key,
1863 | | ... flags: flags.clone(),
1864 | | ... sum: None,
1865 | | ... }
1866 | | ... .into();
| |_____________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
help: consider removing `.into()`
|
1860 ~ GroveOp::InsertTreeWithRootHash {
1861 + hash: root_hash,
1862 + root_key: calculated_root_key,
1863 + flags: flags.clone(),
1864 + sum: None,
1865 ~ };
|
|
useless conversion to the same type: `batch::GroveOp`:
grovedb/src/batch/mod.rs#L1828
warning: useless conversion to the same type: `batch::GroveOp`
--> grovedb/src/batch/mod.rs:1828:49
|
1828 | / ... GroveOp::ReplaceTreeRootKey {
1829 | | ... hash: root_hash,
1830 | | ... root_key: calculated_root_key,
1831 | | ... sum: sum_value,
1832 | | ... }
1833 | | ... .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()`
|
1828 ~ GroveOp::ReplaceTreeRootKey {
1829 + hash: root_hash,
1830 + root_key: calculated_root_key,
1831 + sum: sum_value,
1832 ~ },
|
|
this expression creates a reference which is immediately dereferenced by the compiler:
grovedb/src/batch/mod.rs#L1583
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> grovedb/src/batch/mod.rs:1583:29
|
1583 | ... &merk,
| ^^^^^ help: change this to: `merk`
|
= 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
|
returning the result of a `let` binding from a block:
grovedb/src/batch/mod.rs#L1719
warning: returning the result of a `let` binding from a block
--> grovedb/src/batch/mod.rs:1719:9
|
1714 | / let r = merk
1715 | | .root_hash_key_and_sum()
1716 | | .add_cost(cost)
1717 | | .map_err(Error::MerkError);
| |_______________________________________- unnecessary `let` binding
1718 |
1719 | 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
|
1714 ~
1715 |
1716 ~ merk
1717 + .root_hash_key_and_sum()
1718 + .add_cost(cost)
1719 + .map_err(Error::MerkError)
|
|
this function has too many arguments (9/7):
grovedb/src/batch/mod.rs#L973
warning: this function has too many arguments (9/7)
--> grovedb/src/batch/mod.rs:973:5
|
973 | / fn process_reference_with_hop_count_greater_than_one<'a, G, SR>(
974 | | &'a mut self,
975 | | key: &[u8],
976 | | reference_path: &[Vec<u8>],
... |
982 | | grove_version: &GroveVersion,
983 | | ) -> 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#L883
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/batch/mod.rs:883:47
|
883 | fn get_and_deserialize_referenced_element<'a>(
| ^^
884 | &'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
|
883 ~ fn get_and_deserialize_referenced_element(
884 ~ &mut self,
|
|
this function has too many arguments (8/7):
grovedb/src/batch/mod.rs#L755
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:755:5
|
755 | / fn process_reference<'a, G, SR>(
756 | | &'a mut self,
757 | | qualified_path: &[Vec<u8>],
758 | | ops_by_qualified_paths: &'a BTreeMap<Vec<Vec<u8>>, GroveOp>,
... |
763 | | grove_version: &GroveVersion,
764 | | ) -> CostResult<CryptoHash, Error>
| |______________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
doc list item missing indentation:
grovedb/src/batch/mod.rs#L742
warning: doc list item missing indentation
--> grovedb/src/batch/mod.rs:742:9
|
742 | /// 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
|
742 | /// missing reference, corrupted data, or invalid batch operation.
| ++
|
doc list item missing indentation:
grovedb/src/batch/mod.rs#L738
warning: doc list item missing indentation
--> grovedb/src/batch/mod.rs:738:9
|
738 | /// 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
|
738 | /// associated cost, if successful.
| ++
|
doc list item missing indentation:
grovedb/src/batch/mod.rs#L725
warning: doc list item missing indentation
--> grovedb/src/batch/mod.rs:725:9
|
725 | /// 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
|
725 | /// element.
| +++
|
doc list item missing indentation:
grovedb/src/batch/mod.rs#L724
warning: doc list item missing indentation
--> grovedb/src/batch/mod.rs:724:9
|
724 | /// 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
|
724 | /// element and then determines the next step based on the type of the
| +++
|
doc list item missing indentation:
grovedb/src/batch/mod.rs#L721
warning: doc list item missing indentation
--> grovedb/src/batch/mod.rs:721:9
|
721 | /// 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
|
721 | /// value hash from the reference element.
| +++
|
this function has too many arguments (8/7):
grovedb/src/batch/mod.rs#L691
warning: this function has too many arguments (8/7)
--> grovedb/src/batch/mod.rs:691:5
|
691 | / fn execute_ops_on_path(
692 | | &mut self,
693 | | path: &KeyInfoPath,
694 | | ops_at_path_by_key: BTreeMap<KeyInfo, GroveOp>,
... |
699 | | grove_version: &GroveVersion,
700 | | ) -> CostResult<RootHashKeyAndSum, 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#L273
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> grovedb/src/batch/estimated_costs/average_case_costs.rs:273:13
|
273 | / if !self.cached_merks.contains_key(&base_path) {
274 | | cost_return_on_error_no_add!(
275 | | &cost,
276 | | GroveDb::add_average_case_get_merk_at_path::<RocksDbStorage>(
... |
287 | | .insert(base_path, estimated_layer_info.is_sum_tree);
288 | | }
| |_____________^
|
= 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
|
273 ~ if let std::collections::hash_map::Entry::Vacant(e) = self.cached_merks.entry(base_path) {
274 + cost_return_on_error_no_add!(
275 + &cost,
276 + GroveDb::add_average_case_get_merk_at_path::<RocksDbStorage>(
277 + &mut cost,
278 + &base_path,
279 + estimated_layer_info
280 + .estimated_layer_count
281 + .estimated_to_be_empty(),
282 + estimated_layer_info.is_sum_tree,
283 + grove_version
284 + )
285 + );
286 + e.insert(estimated_layer_info.is_sum_tree);
287 + }
|
|
unnecessary use of `get(path).is_none()`:
grovedb/src/batch/estimated_costs/average_case_costs.rs#L219
warning: unnecessary use of `get(path).is_none()`
--> grovedb/src/batch/estimated_costs/average_case_costs.rs:219:30
|
219 | 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#L688
warning: method `get_batch_run_mode` is never used
--> grovedb/src/batch/mod.rs:688:8
|
685 | trait TreeCache<G, SR> {
| --------- method in this trait
...
688 | fn get_batch_run_mode(&self) -> BatchRunMode;
| ^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
duplicated attribute:
merk/src/estimated_costs/average_case_costs.rs#L49
warning: duplicated attribute
--> merk/src/estimated_costs/average_case_costs.rs:49:7
|
49 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
|
note: first defined here
--> merk/src/estimated_costs/average_case_costs.rs:48:7
|
48 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
help: remove this attribute
--> merk/src/estimated_costs/average_case_costs.rs:49:7
|
49 | #[cfg(feature = "full")]
| ^^^^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#duplicated_attributes
= note: `#[warn(clippy::duplicated_attributes)]` on by default
|
this function has too many arguments (8/7):
merk/src/tree/mod.rs#L789
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:789:5
|
789 | / pub fn put_value_with_reference_value_hash_and_value_cost(
790 | | mut self,
791 | | value: Vec<u8>,
792 | | value_hash: CryptoHash,
... |
811 | | >,
812 | | ) -> 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#L326
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:326:5
|
326 | / pub fn put_value_with_reference_value_hash_and_value_cost(
327 | | mut self,
328 | | value: Vec<u8>,
329 | | value_hash: CryptoHash,
... |
348 | | >,
349 | | ) -> 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 (10/7):
merk/src/tree/ops.rs#L712
warning: this function has too many arguments (10/7)
--> merk/src/tree/ops.rs:712:5
|
712 | / fn recurse<K: AsRef<[u8]>, C, V, U, R>(
713 | | self,
714 | | batch: &MerkBatch<K>,
715 | | mid: usize,
... |
722 | | grove_version: &GroveVersion,
723 | | ) -> 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#L148
warning: this function has too many arguments (8/7)
--> merk/src/tree/ops.rs:148:5
|
148 | / pub fn apply_to<K: AsRef<[u8]>, C, V, U, R>(
149 | | maybe_tree: Option<Self>,
150 | | batch: &MerkBatch<K>,
151 | | source: S,
... |
156 | | grove_version: &GroveVersion,
157 | | ) -> CostContext<Result<(Option<TreeNode>, KeyUpdates), Error>>
| |___________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
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#L656
warning: this function has too many arguments (8/7)
--> merk/src/merk/mod.rs:656:5
|
656 | / fn verify_link(
657 | | &self,
658 | | link: &Link,
659 | | parent_key: &[u8],
... |
664 | | grove_version: &GroveVersion,
665 | | ) {
| |_____^
|
= 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#L596
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:596:10
|
596 | ) -> (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
|
this function has too many arguments (9/7):
merk/src/merk/apply.rs#L310
warning: this function has too many arguments (9/7)
--> merk/src/merk/apply.rs:310:5
|
310 | / pub fn apply_unchecked<KB, KA, C, V, U, R>(
311 | | &mut self,
312 | | batch: &MerkBatch<KB>,
313 | | aux: &AuxMerkBatch<KA>,
... |
319 | | grove_version: &GroveVersion,
320 | | ) -> 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 (9/7):
merk/src/merk/apply.rs#L201
warning: this function has too many arguments (9/7)
--> merk/src/merk/apply.rs:201:5
|
201 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>(
202 | | &mut self,
203 | | batch: &MerkBatch<KB>,
204 | | aux: &AuxMerkBatch<KA>,
... |
226 | | grove_version: &GroveVersion,
227 | | ) -> 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 `attempt_state_recovery` is never used:
merk/src/merk/restore.rs#L412
warning: method `attempt_state_recovery` is never used
--> merk/src/merk/restore.rs:412:8
|
67 | impl<'db, S: StorageContext<'db>> Restorer<S> {
| --------------------------------------------- method in this implementation
...
412 | 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
|
'test' may be misspelled as 'tests':
merk/src/tree/fuzz_tests.rs#L3
warning: 'test' may be misspelled as 'tests'
--> merk/src/tree/fuzz_tests.rs:3:8
|
3 | #![cfg(tests)]
| ^^^^^ help: did you mean: `test`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#maybe_misused_cfg
= note: `#[warn(clippy::maybe_misused_cfg)]` on by default
|
doc list item missing indentation:
costs/src/context.rs#L173
warning: doc list item missing 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
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Code Coverage
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v2. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|