Skip to content

feat: bidirectional references and cleanup #632

feat: bidirectional references and cleanup

feat: bidirectional references and cleanup #632

Triggered via pull request November 6, 2024 19:40
Status Failure
Total duration 7m 8s
Artifacts

grovedb.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 113 warnings
Compilation errors
Process completed with exit code 101.
non-exhaustive patterns: `grovedb::Element::BidirectionalReference(_, _, _, _)`, `grovedb::Element::ItemWithBackwardsReferences(_, _, _)` and `grovedb::Element::SumItemWithBackwardsReferences(_, _, _)` not covered: node-grove/src/converter.rs#L85
error[E0004]: non-exhaustive patterns: `grovedb::Element::BidirectionalReference(_, _, _, _)`, `grovedb::Element::ItemWithBackwardsReferences(_, _, _)` and `grovedb::Element::SumItemWithBackwardsReferences(_, _, _)` not covered --> node-grove/src/converter.rs:85:43 | 85 | let js_value: Handle<JsValue> = match element { | ^^^^^^^ patterns `grovedb::Element::BidirectionalReference(_, _, _, _)`, `grovedb::Element::ItemWithBackwardsReferences(_, _, _)` and `grovedb::Element::SumItemWithBackwardsReferences(_, _, _)` not covered | note: `grovedb::Element` defined here --> /home/runner/work/grovedb/grovedb/grovedb/src/element/mod.rs:79:1 | 79 | pub enum Element { | ^^^^^^^^^^^^^^^^ ... 93 | BidirectionalReference( | ---------------------- not covered ... 100 | ItemWithBackwardsReferences( | --------------------------- not covered ... 107 | SumItemWithBackwardsReferences( | ------------------------------ not covered = note: the matched value is of type `grovedb::Element` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | 94 ~ Element::SumTree(..) => nested_vecs_to_js(vec![], cx)?, 95 ~ grovedb::Element::BidirectionalReference(_, _, _, _) | grovedb::Element::ItemWithBackwardsReferences(_, _, _) | grovedb::Element::SumItemWithBackwardsReferences(_, _, _) => todo!(), |
non-exhaustive patterns: `grovedb::Element::BidirectionalReference(_, _, _, _)`, `grovedb::Element::ItemWithBackwardsReferences(_, _, _)` and `grovedb::Element::SumItemWithBackwardsReferences(_, _, _)` not covered: node-grove/src/converter.rs#L35
error[E0004]: non-exhaustive patterns: `grovedb::Element::BidirectionalReference(_, _, _, _)`, `grovedb::Element::ItemWithBackwardsReferences(_, _, _)` and `grovedb::Element::SumItemWithBackwardsReferences(_, _, _)` not covered --> node-grove/src/converter.rs:35:11 | 35 | match element { | ^^^^^^^ patterns `grovedb::Element::BidirectionalReference(_, _, _, _)`, `grovedb::Element::ItemWithBackwardsReferences(_, _, _)` and `grovedb::Element::SumItemWithBackwardsReferences(_, _, _)` not covered | note: `grovedb::Element` defined here --> /home/runner/work/grovedb/grovedb/grovedb/src/element/mod.rs:79:1 | 79 | pub enum Element { | ^^^^^^^^^^^^^^^^ ... 93 | BidirectionalReference( | ---------------------- not covered ... 100 | ItemWithBackwardsReferences( | --------------------------- not covered ... 107 | SumItemWithBackwardsReferences( | ------------------------------ not covered = note: the matched value is of type `grovedb::Element` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms | 40 ~ Element::SumTree(..) => "sum_tree".to_string(), 41 ~ grovedb::Element::BidirectionalReference(_, _, _, _) | grovedb::Element::ItemWithBackwardsReferences(_, _, _) | grovedb::Element::SumItemWithBackwardsReferences(_, _, _) => todo!(), |
Linting
Clippy had exited with the 101 exit code
Tests
Process completed with exit code 101.
Dependencies security audit
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Dependencies security audit
The following actions use a deprecated Node.js version and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Dependencies security audit
2 warnings found!
Dependencies security audit
Unknown warning kind unsound found, please, file a bug
Formatting
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Formatting
The following actions use a deprecated Node.js version and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Compilation errors
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Compilation errors
The following actions use a deprecated Node.js version and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
this function has too many arguments (8/7): grovedb/src/lib.rs#L782
warning: this function has too many arguments (8/7) --> grovedb/src/lib.rs:782:5 | 782 | / fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>( 783 | | &'db self, 784 | | merk: Merk<S>, 785 | | path: &SubtreePath<B>, ... | 790 | | grove_version: &GroveVersion, 791 | | ) -> 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#L791
warning: very complex type used. Consider factoring parts into `type` definitions --> grovedb/src/lib.rs:791:10 | 791 | ) -> 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#L767
warning: very complex type used. Consider factoring parts into `type` definitions --> grovedb/src/lib.rs:767:10 | 767 | ) -> 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
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: grovedb/src/operations/proof/verify.rs#L370
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> grovedb/src/operations/proof/verify.rs:370:25 | 370 | 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 expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/operations/proof/generate.rs#L218
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/operations/proof/generate.rs:218:74 | 218 | self.open_transactional_merk_at_path(path.as_slice().into(), &tx, None, grove_version) | ^^^ help: change this to: `tx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this function has too many arguments (8/7): grovedb/src/operations/insert/mod.rs#L153
warning: this function has too many arguments (8/7) --> grovedb/src/operations/insert/mod.rs:153:5 | 153 | / fn add_element_on_transaction<'db, B: AsRef<[u8]>>( 154 | | &'db self, 155 | | path: SubtreePath<B>, 156 | | key: &[u8], ... | 161 | | grove_version: &GroveVersion, 162 | | ) -> 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#L97
warning: this function has too many arguments (8/7) --> grovedb/src/operations/insert/mod.rs:97:5 | 97 | / fn insert_on_transaction<'db, 'b, B: AsRef<[u8]>>( 98 | | &self, 99 | | path: SubtreePath<'b, B>, 100 | | key: &[u8], ... | 105 | | grove_version: &GroveVersion, 106 | | ) -> 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#L565
warning: this function has too many arguments (8/7) --> grovedb/src/operations/get/query.rs:565:5 | 565 | / pub fn query_raw( 566 | | &self, 567 | | path_query: &PathQuery, 568 | | allow_cache: bool, ... | 573 | | grove_version: &GroveVersion, 574 | | ) -> 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#L237
warning: this function has too many arguments (8/7) --> grovedb/src/operations/get/query.rs:237:5 | 237 | / pub fn query( 238 | | &self, 239 | | path_query: &PathQuery, 240 | | allow_cache: bool, ... | 245 | | grove_version: &GroveVersion, 246 | | ) -> 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#L115
warning: this function has too many arguments (8/7) --> grovedb/src/operations/get/query.rs:115:5 | 115 | / pub fn query_many_raw( 116 | | &self, 117 | | path_queries: &[&PathQuery], 118 | | allow_cache: bool, ... | 123 | | grove_version: &GroveVersion, 124 | | ) -> 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#L581
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/mod.rs:581:5 | 581 | / fn delete_internal<B: AsRef<[u8]>>( 582 | | &self, 583 | | path: SubtreePath<B>, 584 | | key: &[u8], ... | 596 | | grove_version: &GroveVersion, 597 | | ) -> 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#L448
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/mod.rs:448:5 | 448 | / pub fn delete_operation_for_delete_internal<B: AsRef<[u8]>>( 449 | | &self, 450 | | path: SubtreePath<B>, 451 | | key: &[u8], ... | 456 | | grove_version: &GroveVersion, 457 | | ) -> 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 expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/merk_cache.rs#L209
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/merk_cache.rs:209:9 | 209 | &self.merk | ^^^^^^^^^^ help: change this to: `self.merk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it: grovedb/src/merk_cache.rs#L129
warning: call to `std::mem::forget` with a value that does not implement `Drop`. Forgetting such a type is the same as dropping it --> grovedb/src/merk_cache.rs:129:9 | 129 | mem::forget(result_uninit); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | note: argument has type `[std::mem::MaybeUninit<merk_cache::MerkHandle<'_, '_>>; N]` --> grovedb/src/merk_cache.rs:129:21 | 129 | mem::forget(result_uninit); | ^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#forget_non_drop = note: `#[warn(clippy::forget_non_drop)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/merk_cache.rs#L117
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/merk_cache.rs:117:21 | 117 | &self.version, | ^^^^^^^^^^^^^ help: change this to: `self.version` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/merk_cache.rs#L49
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/merk_cache.rs:49:17 | 49 | tx: &tx, | ^^^ help: change this to: `tx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this lifetime isn't used in the function definition: grovedb/src/merk_cache.rs#L42
warning: this lifetime isn't used in the function definition --> grovedb/src/merk_cache.rs:42:23 | 42 | pub(crate) fn new<'tx>( | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#extra_unused_lifetimes = note: `#[warn(clippy::extra_unused_lifetimes)]` on by default
this function has too many arguments (12/7): grovedb/src/element/query.rs#L714
warning: this function has too many arguments (12/7) --> grovedb/src/element/query.rs:714:5 | 714 | / fn query_item( 715 | | storage: &RocksDbStorage, 716 | | item: &QueryItem, 717 | | results: &mut Vec<QueryResultElement>, ... | 726 | | grove_version: &GroveVersion, 727 | | ) -> 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#L304
warning: this function has too many arguments (8/7) --> grovedb/src/element/query.rs:304:5 | 304 | / pub fn get_query_apply_function( 305 | | storage: &RocksDbStorage, 306 | | path: &[&[u8]], 307 | | sized_query: &SizedQuery, ... | 312 | | grove_version: &GroveVersion, 313 | | ) -> 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#L340
warning: this `let...else` may be rewritten with the `?` operator --> grovedb/src/element/helpers.rs:340:9 | 340 | / let Some(value_cost) = self.get_specialized_cost(grove_version).ok() else { 341 | | return None; 342 | | }; | |__________^ 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#L265
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> grovedb/src/element/helpers.rs:265:14 | 265 | 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
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/debugger.rs#L335
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/debugger.rs:335:29 | 335 | ... &tx, | ^^^ help: change this to: `tx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this function has too many arguments (8/7): grovedb/src/batch/mod.rs#L2356
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:2356:5 | 2356 | / pub fn apply_partial_batch_with_element_flags_update( 2357 | | &self, 2358 | | ops: Vec<QualifiedGroveDbOp>, 2359 | | batch_apply_options: Option<BatchApplyOptions>, ... | 2378 | | grove_version: &GroveVersion, 2379 | | ) -> 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#L1994
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:1994:5 | 1994 | / fn continue_partial_apply_body<'db, S: StorageContext<'db>>( 1995 | | &self, 1996 | | previous_leftover_operations: Option<OpsByLevelPath>, 1997 | | additional_ops: Vec<QualifiedGroveDbOp>, ... | 2013 | | grove_version: &GroveVersion, 2014 | | ) -> 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#L1920
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1920:37 | 1920 | / ... GroveOp::ReplaceTreeRootKey { 1921 | | ... hash: root_hash, 1922 | | ... root_key: calculated_root_key, 1923 | | ... sum: sum_value, 1924 | | ... } 1925 | | ... .into(), | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1920 ~ GroveOp::ReplaceTreeRootKey { 1921 + hash: root_hash, 1922 + root_key: calculated_root_key, 1923 + sum: sum_value, 1924 ~ }, |
useless conversion to the same type: `batch::GroveOp`: grovedb/src/batch/mod.rs#L1868
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1868:61 | 1868 | / ... GroveOp::InsertTreeWithRootHash { 1869 | | ... hash: root_hash, 1870 | | ... root_key: calculated_root_key, 1871 | | ... flags: flags.clone(), 1872 | | ... sum: sum_value, 1873 | | ... } 1874 | | ... .into(); | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1868 ~ GroveOp::InsertTreeWithRootHash { 1869 + hash: root_hash, 1870 + root_key: calculated_root_key, 1871 + flags: flags.clone(), 1872 + sum: sum_value, 1873 ~ }; |
useless conversion to the same type: `batch::GroveOp`: grovedb/src/batch/mod.rs#L1857
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1857:61 | 1857 | / ... GroveOp::InsertTreeWithRootHash { 1858 | | ... hash: root_hash, 1859 | | ... root_key: calculated_root_key, 1860 | | ... flags: flags.clone(), 1861 | | ... sum: None, 1862 | | ... } 1863 | | ... .into(); | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1857 ~ GroveOp::InsertTreeWithRootHash { 1858 + hash: root_hash, 1859 + root_key: calculated_root_key, 1860 + flags: flags.clone(), 1861 + sum: None, 1862 ~ }; |
useless conversion to the same type: `batch::GroveOp`: grovedb/src/batch/mod.rs#L1825
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1825:49 | 1825 | / ... GroveOp::ReplaceTreeRootKey { 1826 | | ... hash: root_hash, 1827 | | ... root_key: calculated_root_key, 1828 | | ... sum: sum_value, 1829 | | ... } 1830 | | ... .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()` | 1825 ~ GroveOp::ReplaceTreeRootKey { 1826 + hash: root_hash, 1827 + root_key: calculated_root_key, 1828 + sum: sum_value, 1829 ~ }, |
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/batch/mod.rs#L1563
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/batch/mod.rs:1563:29 | 1563 | ... &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#L1716
warning: returning the result of a `let` binding from a block --> grovedb/src/batch/mod.rs:1716:9 | 1711 | / let r = merk 1712 | | .root_hash_key_and_sum() 1713 | | .add_cost(cost) 1714 | | .map_err(Error::MerkError); | |_______________________________________- unnecessary `let` binding 1715 | 1716 | 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 | 1711 ~ 1712 | 1713 ~ merk 1714 + .root_hash_key_and_sum() 1715 + .add_cost(cost) 1716 + .map_err(Error::MerkError) |
this function has too many arguments (9/7): grovedb/src/batch/mod.rs#L971
warning: this function has too many arguments (9/7) --> grovedb/src/batch/mod.rs:971:5 | 971 | / fn process_reference_with_hop_count_greater_than_one<'a, G, SR>( 972 | | &'a mut self, 973 | | key: &[u8], 974 | | reference_path: &[Vec<u8>], ... | 980 | | grove_version: &GroveVersion, 981 | | ) -> 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#L881
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/batch/mod.rs:881:47 | 881 | fn get_and_deserialize_referenced_element<'a>( | ^^ 882 | &'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 | 881 ~ fn get_and_deserialize_referenced_element( 882 ~ &mut self, |
this function has too many arguments (8/7): grovedb/src/batch/mod.rs#L753
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:753:5 | 753 | / fn process_reference<'a, G, SR>( 754 | | &'a mut self, 755 | | qualified_path: &[Vec<u8>], 756 | | ops_by_qualified_paths: &'a BTreeMap<Vec<Vec<u8>>, GroveOp>, ... | 761 | | grove_version: &GroveVersion, 762 | | ) -> 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#L740
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:740:9 | 740 | /// 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 | 740 | /// missing reference, corrupted data, or invalid batch operation. | ++
doc list item without indentation: grovedb/src/batch/mod.rs#L736
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:736:9 | 736 | /// 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 | 736 | /// associated cost, if successful. | ++
doc list item without indentation: grovedb/src/batch/mod.rs#L723
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:723:9 | 723 | /// 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 | 723 | /// element. | +++
doc list item without indentation: grovedb/src/batch/mod.rs#L722
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:722:9 | 722 | /// 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 | 722 | /// element and then determines the next step based on the type of the | +++
doc list item without indentation: grovedb/src/batch/mod.rs#L719
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:719:9 | 719 | /// 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 | 719 | /// value hash from the reference element. | +++
this function has too many arguments (8/7): grovedb/src/batch/mod.rs#L689
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:689:5 | 689 | / fn execute_ops_on_path( 690 | | &mut self, 691 | | path: &KeyInfoPath, 692 | | ops_at_path_by_key: BTreeMap<KeyInfo, GroveOp>, ... | 697 | | grove_version: &GroveVersion, 698 | | ) -> CostResult<RootHashKeyAndSum, 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#L62
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/batch/just_in_time_reference_update.rs:62:47 | 62 | 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#L28
warning: this function has too many arguments (9/7) --> grovedb/src/batch/just_in_time_reference_update.rs:28:5 | 28 | / pub(crate) fn process_old_element_flags<G, SR>( 29 | | key: &[u8], 30 | | serialized: &[u8], 31 | | new_element: &mut Element, ... | 37 | | grove_version: &GroveVersion, 38 | | ) -> 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#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
associated items `insert` and `new` are never used: grovedb/src/merk_cache.rs#L214
warning: associated items `insert` and `new` are never used --> grovedb/src/merk_cache.rs:214:19 | 213 | impl<'db, 'c> MerkHandle<'db, 'c> { | --------------------------------- associated items in this implementation 214 | pub(crate) fn insert( | ^^^^^^ ... 225 | fn new(cached_merk: &'c mut CachedMerk<'db>, version: &'db GroveVersion) -> Self { | ^^^
struct `MerkHandle` is never constructed: grovedb/src/merk_cache.rs#L197
warning: struct `MerkHandle` is never constructed --> grovedb/src/merk_cache.rs:197:19 | 197 | pub(crate) struct MerkHandle<'db, 'c> { | ^^^^^^^^^^
associated items `new`, `get_merk_mut_internal`, `get_multi_mut`, `finalize`, and `propagate_updated_merks` are never used: grovedb/src/merk_cache.rs#L42
warning: associated items `new`, `get_merk_mut_internal`, `get_multi_mut`, `finalize`, and `propagate_updated_merks` are never used --> grovedb/src/merk_cache.rs:42:19 | 41 | impl<'db, 'b, B: AsRef<[u8]>> MerkCache<'db, 'b, B> { | --------------------------------------------------- associated items in this implementation 42 | pub(crate) fn new<'tx>( | ^^^ ... 59 | fn get_merk_mut_internal<'c>( | ^^^^^^^^^^^^^^^^^^^^^ ... 93 | pub(crate) fn get_multi_mut<'c, const N: usize>( | ^^^^^^^^^^^^^ ... 136 | pub(crate) fn finalize(mut self) -> CostResult<Box<StorageBatch>, Error> { | ^^^^^^^^ ... 155 | fn propagate_updated_merks(mut self) -> CostResult<(), Error> { | ^^^^^^^^^^^^^^^^^^^^^^^
struct `MerkCache` is never constructed: grovedb/src/merk_cache.rs#L33
warning: struct `MerkCache` is never constructed --> grovedb/src/merk_cache.rs:33:19 | 33 | pub(crate) struct MerkCache<'db, 'b, B> { | ^^^^^^^^^
struct `CachedMerk` is never constructed: grovedb/src/merk_cache.rs#L20
warning: struct `CachedMerk` is never constructed --> grovedb/src/merk_cache.rs:20:8 | 20 | struct CachedMerk<'db> { | ^^^^^^^^^^
method `referenced_from` is never used: grovedb/src/element/insert.rs#L469
warning: method `referenced_from` is never used --> grovedb/src/element/insert.rs:469:8 | 18 | impl Element { | ------------ method in this implementation ... 469 | fn referenced_from( | ^^^^^^^^^^^^^^^
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#L686
warning: method `get_batch_run_mode` is never used --> grovedb/src/batch/mod.rs:686:8 | 683 | trait TreeCache<G, SR> { | --------- method in this trait ... 686 | fn get_batch_run_mode(&self) -> BatchRunMode; | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
variable does not need to be mutable: grovedb/src/merk_cache.rs#L136
warning: variable does not need to be mutable --> grovedb/src/merk_cache.rs:136:28 | 136 | pub(crate) fn finalize(mut self) -> CostResult<Box<StorageBatch>, Error> { | ----^^^^ | | | help: remove this `mut` | = note: `#[warn(unused_mut)]` on by default
unused variable: `backward_references`: grovedb/src/element/mod.rs#L138
warning: unused variable: `backward_references` --> grovedb/src/element/mod.rs:138:51 | 138 | Element::BidirectionalReference(path, backward_references, max_hop, flags) => { | ^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_backward_references` | = note: `#[warn(unused_variables)]` on by default
casting to the same type is unnecessary (`u32` -> `u32`): merk/src/estimated_costs/average_case_costs.rs#L423
warning: casting to the same type is unnecessary (`u32` -> `u32`) --> merk/src/estimated_costs/average_case_costs.rs:423:24 | 423 | 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 = note: `#[warn(clippy::unnecessary_cast)]` 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 (9/7): merk/src/tree/mod.rs#L850
warning: this function has too many arguments (9/7) --> merk/src/tree/mod.rs:850:5 | 850 | / pub fn put_value_with_reference_value_hash_and_value_cost( 851 | | mut self, 852 | | value: Vec<u8>, 853 | | value_hash: CryptoHash, ... | 876 | | >, 877 | | ) -> 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#L792
warning: this function has too many arguments (8/7) --> merk/src/tree/mod.rs:792:5 | 792 | / pub fn put_value_and_reference_value_hash( 793 | | mut self, 794 | | value: Vec<u8>, 795 | | value_hash: CryptoHash, ... | 817 | | >, 818 | | ) -> 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#L736
warning: this function has too many arguments (8/7) --> merk/src/tree/mod.rs:736:5 | 736 | / pub fn put_value_with_fixed_cost( 737 | | mut self, 738 | | value: Vec<u8>, 739 | | value_fixed_cost: u32, ... | 761 | | >, 762 | | ) -> 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 (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
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 (10/7): merk/src/merk/apply.rs#L321
warning: this function has too many arguments (10/7) --> merk/src/merk/apply.rs:321:5 | 321 | / pub fn apply_unchecked<KB, KA, C, V, T, U, R>( 322 | | &mut self, 323 | | batch: &MerkBatch<KB>, 324 | | aux: &AuxMerkBatch<KA>, ... | 331 | | grove_version: &GroveVersion, 332 | | ) -> 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#L205
warning: this function has too many arguments (10/7) --> merk/src/merk/apply.rs:205:5 | 205 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>( 206 | | &mut self, 207 | | batch: &MerkBatch<KB>, 208 | | aux: &AuxMerkBatch<KA>, ... | 234 | | grove_version: &GroveVersion, 235 | | ) -> 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#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
struct `StorageBatch` has a public `len` method, but no `is_empty` method: storage/src/storage.rs#L309
warning: struct `StorageBatch` has a public `len` method, but no `is_empty` method --> storage/src/storage.rs:309:5 | 309 | pub fn len(&self) -> usize { | ^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty = note: `#[warn(clippy::len_without_is_empty)]` 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; |
doc list item without indentation: costs/src/context.rs#L182
warning: doc list item without indentation --> costs/src/context.rs:182:5 | 182 | /// 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 | 182 | /// accumulator; 4. Early termination uses external cost accumulator so previous | +++
Linting
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Linting
The following actions use a deprecated Node.js version and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Tests
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
Tests
The following actions use a deprecated Node.js version and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/