Skip to content

feat: bidirectional references #658

feat: bidirectional references

feat: bidirectional references #658

Triggered via pull request December 27, 2024 10:16
Status Failure
Total duration 6m 52s
Artifacts

grovedb.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

5 errors and 160 warnings
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:77:1 | 77 | pub enum Element { | ^^^^^^^^^^^^^^^^ ... 91 | BidirectionalReference(BidirectionalReference), | ---------------------- not covered 92 | /// An ordinary value that has a backwards reference 93 | ItemWithBackwardsReferences(Vec<u8>, Option<ElementFlags>), | --------------------------- not covered ... 96 | SumItemWithBackwardsReferences(SumValue, Option<ElementFlags>), | ------------------------------ 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:77:1 | 77 | pub enum Element { | ^^^^^^^^^^^^^^^^ ... 91 | BidirectionalReference(BidirectionalReference), | ---------------------- not covered 92 | /// An ordinary value that has a backwards reference 93 | ItemWithBackwardsReferences(Vec<u8>, Option<ElementFlags>), | --------------------------- not covered ... 96 | SumItemWithBackwardsReferences(SumValue, Option<ElementFlags>), | ------------------------------ 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
Compilation errors
Process completed with exit code 101.
Tests
Process completed with exit code 101.
Dependencies security audit
2 warnings found!
Dependencies security audit
Unknown warning kind unsound found, please, file a bug
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/
this function has too many arguments (8/7): grovedb/src/lib.rs#L732
warning: this function has too many arguments (8/7) --> grovedb/src/lib.rs:732:5 | 732 | / fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>( 733 | | &'db self, 734 | | merk: Merk<S>, 735 | | path: &SubtreePath<B>, ... | 740 | | grove_version: &GroveVersion, 741 | | ) -> 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#L741
warning: very complex type used. Consider factoring parts into `type` definitions --> grovedb/src/lib.rs:741:10 | 741 | ) -> 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#L717
warning: very complex type used. Consider factoring parts into `type` definitions --> grovedb/src/lib.rs:717:10 | 717 | ) -> 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
the following explicit lifetimes could be elided: 'a: grovedb/src/util.rs#L48
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/util.rs:48:6 | 48 | impl<'a, 'db> AsRef<Transaction<'db>> for TxRef<'a, 'db> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 48 - impl<'a, 'db> AsRef<Transaction<'db>> for TxRef<'a, 'db> { 48 + impl<'db> AsRef<Transaction<'db>> for TxRef<'_, 'db> { |
the following explicit lifetimes could be elided: 'db: grovedb/src/replication.rs#L49
warning: the following explicit lifetimes could be elided: 'db --> grovedb/src/replication.rs:49:6 | 49 | impl<'db> Default for MultiStateSyncInfo<'db> { | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 49 - impl<'db> Default for MultiStateSyncInfo<'db> { 49 + impl Default for MultiStateSyncInfo<'_> { |
calling `push_str()` using a single-character string literal: grovedb/src/reference_path.rs#L142
warning: calling `push_str()` using a single-character string literal --> grovedb/src/reference_path.rs:142:17 | 142 | hx.push_str(")"); | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `hx.push(')')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str
calling `push_str()` using a single-character string literal: grovedb/src/reference_path.rs#L140
warning: calling `push_str()` using a single-character string literal --> grovedb/src/reference_path.rs:140:17 | 140 | hx.push_str("("); | ^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `hx.push('(')` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str = note: `#[warn(clippy::single_char_add_str)]` on by default
the following explicit lifetimes could be elided: 'a: grovedb/src/query/mod.rs#L512
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/query/mod.rs:512:6 | 512 | impl<'a> fmt::Display for SinglePathSubquery<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 512 - impl<'a> fmt::Display for SinglePathSubquery<'a> { 512 + impl fmt::Display for SinglePathSubquery<'_> { |
the following explicit lifetimes could be elided: 'a: grovedb/src/query/mod.rs#L483
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/query/mod.rs:483:6 | 483 | impl<'a> HasSubquery<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 483 - impl<'a> HasSubquery<'a> { 483 + impl HasSubquery<'_> { |
the following explicit lifetimes could be elided: 'a: grovedb/src/query/mod.rs#L467
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/query/mod.rs:467:6 | 467 | impl<'a> fmt::Display for HasSubquery<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 467 - impl<'a> fmt::Display for HasSubquery<'a> { 467 + impl fmt::Display for HasSubquery<'_> { |
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`: grovedb/src/operations/proof/verify.rs#L369
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> grovedb/src/operations/proof/verify.rs:369:25 | 369 | 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#L292
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` --> grovedb/src/operations/proof/verify.rs:292:17 | 292 | limit_left.as_mut().map(|limit| *limit -= 1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- | | | help: try: `if let Some(limit) = limit_left.as_mut() { ... }` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn = note: `#[warn(clippy::option_map_unit_fn)]` on by default
this function has too many arguments (8/7): grovedb/src/operations/proof/verify.rs#L228
warning: this function has too many arguments (8/7) --> grovedb/src/operations/proof/verify.rs:228:5 | 228 | / fn verify_layer_proof<T>( 229 | | layer_proof: &LayerProof, 230 | | prove_options: &ProveOptions, 231 | | query: &PathQuery, ... | 236 | | grove_version: &GroveVersion, 237 | | ) -> Result<CryptoHash, Error> | |__________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/operations/proof/generate.rs#L216
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/operations/proof/generate.rs:216:74 | 216 | 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 expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/operations/insert/mod.rs#L77
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/operations/insert/mod.rs:77:41 | 77 | let merk_cache = MerkCache::new(&self, tx.as_ref(), grove_version); | ^^^^^ help: change this to: `self` | = 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/get/query.rs#L588
warning: this function has too many arguments (8/7) --> grovedb/src/operations/get/query.rs:588:5 | 588 | / pub fn query_raw( 589 | | &self, 590 | | path_query: &PathQuery, 591 | | allow_cache: bool, ... | 596 | | grove_version: &GroveVersion, 597 | | ) -> 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#L242
warning: this function has too many arguments (8/7) --> grovedb/src/operations/get/query.rs:242:5 | 242 | / pub fn query( 243 | | &self, 244 | | path_query: &PathQuery, 245 | | allow_cache: bool, ... | 250 | | grove_version: &GroveVersion, 251 | | ) -> 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#L579
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/mod.rs:579:5 | 579 | / fn delete_internal<B: AsRef<[u8]>>( 580 | | &self, 581 | | path: SubtreePath<B>, 582 | | key: &[u8], ... | 594 | | grove_version: &GroveVersion, 595 | | ) -> 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#L446
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/mod.rs:446:5 | 446 | / pub fn delete_operation_for_delete_internal<B: AsRef<[u8]>>( 447 | | &self, 448 | | path: SubtreePath<B>, 449 | | key: &[u8], ... | 454 | | grove_version: &GroveVersion, 455 | | ) -> 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#L119
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/worst_case.rs:119:5 | 119 | / pub fn worst_case_delete_operation_for_delete<'db, S: Storage<'db>>( 120 | | path: &KeyInfoPath, 121 | | key: &KeyInfo, 122 | | parent_tree_is_sum_tree: bool, ... | 127 | | grove_version: &GroveVersion, 128 | | ) -> 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#L197
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/delete_up_tree.rs:197:5 | 197 | / pub fn add_delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>( 198 | | &self, 199 | | path: SubtreePath<B>, 200 | | key: &[u8], ... | 205 | | grove_version: &GroveVersion, 206 | | ) -> 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#L165
warning: this function has too many arguments (8/7) --> grovedb/src/operations/delete/delete_up_tree.rs:165:5 | 165 | / pub fn delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>( 166 | | &self, 167 | | path: SubtreePath<B>, 168 | | key: &[u8], ... | 173 | | grove_version: &GroveVersion, 174 | | ) -> 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
the following explicit lifetimes could be elided: 'c: grovedb/src/merk_cache.rs#L174
warning: the following explicit lifetimes could be elided: 'c --> grovedb/src/merk_cache.rs:174:11 | 174 | impl<'db, 'c> MerkHandle<'db, 'c> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 174 - impl<'db, 'c> MerkHandle<'db, 'c> { 174 + impl<'db> MerkHandle<'db, '_> { |
very complex type used. Consider factoring parts into `type` definitions: grovedb/src/merk_cache.rs#L24
warning: very complex type used. Consider factoring parts into `type` definitions --> grovedb/src/merk_cache.rs:24:12 | 24 | merks: UnsafeCell<BTreeMap<SubtreePathBuilder<'b, B>, Box<(Cell<bool>, TxMerk<'db>)>>>, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = 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
this function has too many arguments (12/7): grovedb/src/element/query.rs#L712
warning: this function has too many arguments (12/7) --> grovedb/src/element/query.rs:712:5 | 712 | / fn query_item( 713 | | storage: &RocksDbStorage, 714 | | item: &QueryItem, 715 | | results: &mut Vec<QueryResultElement>, ... | 724 | | grove_version: &GroveVersion, 725 | | ) -> 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#L302
warning: this function has too many arguments (8/7) --> grovedb/src/element/query.rs:302:5 | 302 | / pub fn get_query_apply_function( 303 | | storage: &RocksDbStorage, 304 | | path: &[&[u8]], 305 | | sized_query: &SizedQuery, ... | 310 | | grove_version: &GroveVersion, 311 | | ) -> CostResult<(QueryResultElements, u16), Error> { | |______________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
the following explicit lifetimes could be elided: 'a: grovedb/src/element/query.rs#L172
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/element/query.rs:172:17 | 172 | impl<'db, 'ctx, 'a> fmt::Display for PathQueryPushArgs<'db, 'ctx, 'a> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 172 - impl<'db, 'ctx, 'a> fmt::Display for PathQueryPushArgs<'db, 'ctx, 'a> 172 + impl<'db, 'ctx> fmt::Display for PathQueryPushArgs<'db, 'ctx, '_> |
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/element/insert.rs#L508
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/element/insert.rs:508:32 | 508 | Self::get_optional(&merk, &key, true, grove_version) | ^^^^^ help: change this to: `merk` | = 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/element/insert.rs#L357
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/element/insert.rs:357:32 | 357 | Self::get_optional(&merk, &key, true, grove_version) | ^^^^^ help: change this to: `merk` | = 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/element/insert.rs#L223
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/element/insert.rs:223:32 | 223 | Self::get_optional(&merk, key, true, grove_version) | ^^^^^ help: change this to: `merk` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
this `let...else` may be rewritten with the `?` operator: grovedb/src/element/helpers.rs#L344
warning: this `let...else` may be rewritten with the `?` operator --> grovedb/src/element/helpers.rs:344:9 | 344 | / let Some(value_cost) = self.get_specialized_cost(grove_version).ok() else { 345 | | return None; 346 | | }; | |__________^ 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#L269
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do --> grovedb/src/element/helpers.rs:269:14 | 269 | 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#L336
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/debugger.rs:336:29 | 336 | ... &tx, | ^^^ help: change this to: `tx` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'db, 'c: grovedb/src/bidirectional_references.rs#L634
warning: the following explicit lifetimes could be elided: 'db, 'c --> grovedb/src/bidirectional_references.rs:634:28 | 634 | fn get_backward_references<'db, 'c>( | ^^^ ^^ 635 | merk: &mut MerkHandle<'db, 'c>, | ^^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 634 ~ fn get_backward_references( 635 ~ merk: &mut MerkHandle<'_, '_>, |
the following explicit lifetimes could be elided: 'db, 'c: grovedb/src/bidirectional_references.rs#L593
warning: the following explicit lifetimes could be elided: 'db, 'c --> grovedb/src/bidirectional_references.rs:593:27 | 593 | fn add_backward_reference<'db, 'c>( | ^^^ ^^ 594 | target_merk: &mut MerkHandle<'db, 'c>, | ^^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 593 ~ fn add_backward_reference( 594 ~ target_merk: &mut MerkHandle<'_, '_>, |
the following explicit lifetimes could be elided: 'db, 'c: grovedb/src/bidirectional_references.rs#L554
warning: the following explicit lifetimes could be elided: 'db, 'c --> grovedb/src/bidirectional_references.rs:554:35 | 554 | fn get_backward_references_bitvec<'db, 'c>( | ^^^ ^^ 555 | merk: &mut MerkHandle<'db, 'c>, | ^^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 554 ~ fn get_backward_references_bitvec( 555 ~ merk: &mut MerkHandle<'_, '_>, |
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/bidirectional_references.rs#L455
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/bidirectional_references.rs:455:17 | 455 | &merk_cache.version | ^^^^^^^^^^^^^^^^^^^ help: change this to: `merk_cache.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/bidirectional_references.rs#L349
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/bidirectional_references.rs:349:75 | 349 | cost_return_on_error!(&mut cost, delta.new.value_hash(&merk_cache.version)) | ^^^^^^^^^^^^^^^^^^^ help: change this to: `merk_cache.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/bidirectional_references.rs#L313
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/bidirectional_references.rs:313:75 | 313 | cost_return_on_error!(&mut cost, delta.new.value_hash(&merk_cache.version)) | ^^^^^^^^^^^^^^^^^^^ help: change this to: `merk_cache.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/bidirectional_references.rs#L222
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/bidirectional_references.rs:222:17 | 222 | &merk_cache.version, | ^^^^^^^^^^^^^^^^^^^ help: change this to: `merk_cache.version` | = 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/bidirectional_references.rs#L115
warning: this lifetime isn't used in the function definition --> grovedb/src/bidirectional_references.rs:115:66 | 115 | pub(crate) fn process_bidirectional_reference_insertion<'db, 'b, 'k, B: AsRef<[u8]>>( | ^^ | = 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
the following explicit lifetimes could be elided: 'db: grovedb/src/bidirectional_references.rs#L115
warning: the following explicit lifetimes could be elided: 'db --> grovedb/src/bidirectional_references.rs:115:57 | 115 | pub(crate) fn process_bidirectional_reference_insertion<'db, 'b, 'k, B: AsRef<[u8]>>( | ^^^ 116 | merk_cache: &MerkCache<'db, 'b, B>, | ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 115 ~ pub(crate) fn process_bidirectional_reference_insertion<'b, 'k, B: AsRef<[u8]>>( 116 ~ merk_cache: &MerkCache<'_, 'b, B>, |
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/bidirectional_references.rs#L85
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/bidirectional_references.rs:85:57 | 85 | get_backward_references_bitvec(target_merk, &target_key) | ^^^^^^^^^^^ help: change this to: `target_key` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
the following explicit lifetimes could be elided: 'db, 'c: grovedb/src/bidirectional_references.rs#L76
warning: the following explicit lifetimes could be elided: 'db, 'c --> grovedb/src/bidirectional_references.rs:76:43 | 76 | fn remove_backward_reference_resolved<'db, 'c>( | ^^^ ^^ 77 | target_merk: &mut MerkHandle<'db, 'c>, | ^^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 76 ~ fn remove_backward_reference_resolved( 77 ~ target_merk: &mut MerkHandle<'_, '_>, |
the following explicit lifetimes could be elided: 'c, 'db: grovedb/src/bidirectional_references.rs#L42
warning: the following explicit lifetimes could be elided: 'c, 'db --> grovedb/src/bidirectional_references.rs:42:34 | 42 | fn remove_backward_reference<'db, 'b, 'c, B: AsRef<[u8]>>( | ^^^ ^^ 43 | self, 44 | merk_cache: &'c MerkCache<'db, 'b, B>, | ^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 42 ~ fn remove_backward_reference<'b, B: AsRef<[u8]>>( 43 | self, 44 ~ merk_cache: &MerkCache<'_, 'b, B>, |
this function has too many arguments (8/7): grovedb/src/batch/mod.rs#L2374
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:2374:5 | 2374 | / pub fn apply_partial_batch_with_element_flags_update( 2375 | | &self, 2376 | | ops: Vec<QualifiedGroveDbOp>, 2377 | | batch_apply_options: Option<BatchApplyOptions>, ... | 2396 | | grove_version: &GroveVersion, 2397 | | ) -> 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#L2012
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:2012:5 | 2012 | / fn continue_partial_apply_body<'db, S: StorageContext<'db>>( 2013 | | &self, 2014 | | previous_leftover_operations: Option<OpsByLevelPath>, 2015 | | additional_ops: Vec<QualifiedGroveDbOp>, ... | 2031 | | grove_version: &GroveVersion, 2032 | | ) -> 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#L1938
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1938:37 | 1938 | / ... GroveOp::ReplaceTreeRootKey { 1939 | | ... hash: root_hash, 1940 | | ... root_key: calculated_root_key, 1941 | | ... sum: sum_value, 1942 | | ... } 1943 | | ... .into(), | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1938 ~ GroveOp::ReplaceTreeRootKey { 1939 + hash: root_hash, 1940 + root_key: calculated_root_key, 1941 + sum: sum_value, 1942 ~ }, |
useless conversion to the same type: `batch::GroveOp`: grovedb/src/batch/mod.rs#L1886
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1886:61 | 1886 | / ... GroveOp::InsertTreeWithRootHash { 1887 | | ... hash: root_hash, 1888 | | ... root_key: calculated_root_key, 1889 | | ... flags: flags.clone(), 1890 | | ... sum: sum_value, 1891 | | ... } 1892 | | ... .into(); | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1886 ~ GroveOp::InsertTreeWithRootHash { 1887 + hash: root_hash, 1888 + root_key: calculated_root_key, 1889 + flags: flags.clone(), 1890 + sum: sum_value, 1891 ~ }; |
useless conversion to the same type: `batch::GroveOp`: grovedb/src/batch/mod.rs#L1875
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1875:61 | 1875 | / ... GroveOp::InsertTreeWithRootHash { 1876 | | ... hash: root_hash, 1877 | | ... root_key: calculated_root_key, 1878 | | ... flags: flags.clone(), 1879 | | ... sum: None, 1880 | | ... } 1881 | | ... .into(); | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion help: consider removing `.into()` | 1875 ~ GroveOp::InsertTreeWithRootHash { 1876 + hash: root_hash, 1877 + root_key: calculated_root_key, 1878 + flags: flags.clone(), 1879 + sum: None, 1880 ~ }; |
useless conversion to the same type: `batch::GroveOp`: grovedb/src/batch/mod.rs#L1843
warning: useless conversion to the same type: `batch::GroveOp` --> grovedb/src/batch/mod.rs:1843:49 | 1843 | / ... GroveOp::ReplaceTreeRootKey { 1844 | | ... hash: root_hash, 1845 | | ... root_key: calculated_root_key, 1846 | | ... sum: sum_value, 1847 | | ... } 1848 | | ... .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()` | 1843 ~ GroveOp::ReplaceTreeRootKey { 1844 + hash: root_hash, 1845 + root_key: calculated_root_key, 1846 + sum: sum_value, 1847 ~ }, |
this expression creates a reference which is immediately dereferenced by the compiler: grovedb/src/batch/mod.rs#L1581
warning: this expression creates a reference which is immediately dereferenced by the compiler --> grovedb/src/batch/mod.rs:1581:29 | 1581 | ... &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#L1734
warning: returning the result of a `let` binding from a block --> grovedb/src/batch/mod.rs:1734:9 | 1729 | / let r = merk 1730 | | .root_hash_key_and_sum() 1731 | | .add_cost(cost) 1732 | | .map_err(Error::MerkError); | |_______________________________________- unnecessary `let` binding 1733 | 1734 | 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 | 1729 ~ 1730 | 1731 ~ merk 1732 + .root_hash_key_and_sum() 1733 + .add_cost(cost) 1734 + .map_err(Error::MerkError) |
this function has too many arguments (9/7): grovedb/src/batch/mod.rs#L970
warning: this function has too many arguments (9/7) --> grovedb/src/batch/mod.rs:970:5 | 970 | / fn process_reference_with_hop_count_greater_than_one<'a, G, SR>( 971 | | &'a mut self, 972 | | key: &[u8], 973 | | reference_path: &[Vec<u8>], ... | 979 | | grove_version: &GroveVersion, 980 | | ) -> 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#L880
warning: the following explicit lifetimes could be elided: 'a --> grovedb/src/batch/mod.rs:880:47 | 880 | fn get_and_deserialize_referenced_element<'a>( | ^^ 881 | &'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 | 880 ~ fn get_and_deserialize_referenced_element( 881 ~ &mut self, |
this function has too many arguments (8/7): grovedb/src/batch/mod.rs#L752
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:752:5 | 752 | / fn process_reference<'a, G, SR>( 753 | | &'a mut self, 754 | | qualified_path: &[Vec<u8>], 755 | | ops_by_qualified_paths: &'a BTreeMap<Vec<Vec<u8>>, GroveOp>, ... | 760 | | grove_version: &GroveVersion, 761 | | ) -> 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#L739
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:739:9 | 739 | /// 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 | 739 | /// missing reference, corrupted data, or invalid batch operation. | ++
doc list item without indentation: grovedb/src/batch/mod.rs#L735
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:735:9 | 735 | /// 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 | 735 | /// associated cost, if successful. | ++
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. | ^ | = 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. | +++
doc list item without indentation: grovedb/src/batch/mod.rs#L721
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:721:9 | 721 | /// 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 | 721 | /// element and then determines the next step based on the type of the | +++
doc list item without indentation: grovedb/src/batch/mod.rs#L718
warning: doc list item without indentation --> grovedb/src/batch/mod.rs:718:9 | 718 | /// 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 | 718 | /// value hash from the reference element. | +++
this function has too many arguments (8/7): grovedb/src/batch/mod.rs#L688
warning: this function has too many arguments (8/7) --> grovedb/src/batch/mod.rs:688:5 | 688 | / fn execute_ops_on_path( 689 | | &mut self, 690 | | path: &KeyInfoPath, 691 | | ops_at_path_by_key: BTreeMap<KeyInfo, GroveOp>, ... | 696 | | grove_version: &GroveVersion, 697 | | ) -> 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
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#L685
warning: method `get_batch_run_mode` is never used --> grovedb/src/batch/mod.rs:685:8 | 682 | trait TreeCache<G, SR> { | --------- method in this trait ... 685 | fn get_batch_run_mode(&self) -> BatchRunMode; | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(dead_code)]` on by default
elided lifetime has a name: grovedb/src/replication.rs#L572
warning: elided lifetime has a name --> grovedb/src/replication.rs:572:32 | 566 | fn discover_subtrees<'db>( | --- lifetime `'db` declared here ... 572 | ) -> Result<(Vec<Vec<u8>>, MultiStateSyncInfo), Error> { | ^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'db`
elided lifetime has a name: grovedb/src/replication.rs#L510
warning: elided lifetime has a name --> grovedb/src/replication.rs:510:32 | 504 | fn apply_inner_chunk<'db>( | --- lifetime `'db` declared here ... 510 | ) -> Result<(Vec<Vec<u8>>, SubtreeStateSyncInfo), Error> { | ^^^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'db`
elided lifetime has a name: grovedb/src/replication.rs#L393
warning: elided lifetime has a name --> grovedb/src/replication.rs:393:32 | 385 | pub fn apply_chunk<'db>( | --- lifetime `'db` declared here ... 393 | ) -> Result<(Vec<Vec<u8>>, MultiStateSyncInfo), Error> { | ^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'db`
elided lifetime has a name: grovedb/src/replication.rs#L325
warning: elided lifetime has a name --> grovedb/src/replication.rs:325:17 | 318 | pub fn start_snapshot_syncing<'db>( | --- lifetime `'db` declared here ... 325 | ) -> Result<MultiStateSyncInfo, Error> { | ^^^^^^^^^^^^^^^^^^ this elided lifetime gets resolved as `'db` | = note: `#[warn(elided_named_lifetimes)]` on by default
unused import: `error::GroveVersionError`: grovedb/src/replication.rs#L17
warning: unused import: `error::GroveVersionError` --> grovedb/src/replication.rs:17:41 | 17 | use grovedb_version::{check_grovedb_v0, error::GroveVersionError, version::GroveVersion}; | ^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `error::GroveVersionError`: grovedb/src/operations/delete/average_case.rs#L15
warning: unused import: `error::GroveVersionError` --> grovedb/src/operations/delete/average_case.rs:15:33 | 15 | check_grovedb_v0_with_cost, error::GroveVersionError, version::GroveVersion, | ^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `error::GroveVersionError`: grovedb/src/estimated_costs/worst_case_costs.rs#L22
warning: unused import: `error::GroveVersionError` --> grovedb/src/estimated_costs/worst_case_costs.rs:22:51 | 22 | check_grovedb_v0, check_grovedb_v0_with_cost, error::GroveVersionError, version::GroveVersion, | ^^^^^^^^^^^^^^^^^^^^^^^^
unused import: `error::GroveVersionError`: grovedb/src/estimated_costs/average_case_costs.rs#L20
warning: unused import: `error::GroveVersionError` --> grovedb/src/estimated_costs/average_case_costs.rs:20:51 | 20 | check_grovedb_v0, check_grovedb_v0_with_cost, error::GroveVersionError, version::GroveVersion, | ^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
constants have by default a `'static` lifetime: grovedb/src/bidirectional_references.rs#L20
warning: constants have by default a `'static` lifetime --> grovedb/src/bidirectional_references.rs:20:41 | 20 | const META_BACKWARD_REFERENCES_PREFIX: &'static [u8] = b"refs"; | -^^^^^^^----- help: consider removing `'static`: `&[u8]` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default
unneeded sub `cfg` when there is only one condition: grovedb/src/element/helpers.rs#L20
warning: unneeded sub `cfg` when there is only one condition --> grovedb/src/element/helpers.rs:20:7 | 20 | #[cfg(any(feature = "full"))] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `feature = "full"` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#non_minimal_cfg = note: `#[warn(clippy::non_minimal_cfg)]` on by default
the following explicit lifetimes could be elided: 'a: merk/src/visualize.rs#L87
warning: the following explicit lifetimes could be elided: 'a --> merk/src/visualize.rs:87:6 | 87 | impl<'a, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize for VisualizableTree<'a, F> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 87 - impl<'a, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize for VisualizableTree<'a, F> { 87 + impl<T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize for VisualizableTree<'_, F> { |
the following explicit lifetimes could be elided: 'a: merk/src/visualize.rs#L68
warning: the following explicit lifetimes could be elided: 'a --> merk/src/visualize.rs:68:6 | 68 | impl<'a, 'db, S: StorageContext<'db>, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize | ^^ 69 | for VisualizeableMerk<'a, S, F> | ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 68 ~ impl<'db, S: StorageContext<'db>, T: Visualize, F: Fn(&[u8]) -> T + Copy> Visualize 69 ~ for VisualizeableMerk<'_, S, F> |
casting to the same type is unnecessary (`u32` -> `u32`): merk/src/estimated_costs/average_case_costs.rs#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
the following explicit lifetimes could be elided: 'a: merk/src/tree/iter.rs#L68
warning: the following explicit lifetimes could be elided: 'a --> merk/src/tree/iter.rs:68:6 | 68 | impl<'a> Iterator for Iter<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 68 - impl<'a> Iterator for Iter<'a> { 68 + impl Iterator for Iter<'_> { |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/query/mod.rs#L705
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/query/mod.rs:705:6 | 705 | impl<'a, S> RefWalker<'a, S> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 705 - impl<'a, S> RefWalker<'a, S> 705 + impl<S> RefWalker<'_, S> |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/query/map.rs#L162
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/query/map.rs:162:6 | 162 | impl<'a> Range<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 162 - impl<'a> Range<'a> { 162 + impl Range<'_> { |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/encoding.rs#L417
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/encoding.rs:417:6 | 417 | impl<'a> Iterator for Decoder<'a> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 417 - impl<'a> Iterator for Decoder<'a> { 417 + impl Iterator for Decoder<'_> { |
unneeded `return` statement: merk/src/proofs/chunk/chunk.rs#L217
warning: unneeded `return` statement --> merk/src/proofs/chunk/chunk.rs:217:5 | 217 | / return Ok(match height_proof_tree.child(LEFT) { 218 | | Some(child) => { 219 | | if !matches!(child.tree.node, Node::KVHash(..)) { 220 | | // todo deal with old chunk restoring error ... | 227 | | None => 1, 228 | | }); | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = note: `#[warn(clippy::needless_return)]` on by default help: remove `return` | 217 ~ Ok(match height_proof_tree.child(LEFT) { 218 + Some(child) => { 219 + if !matches!(child.tree.node, Node::KVHash(..)) { 220 + // todo deal with old chunk restoring error 221 + return Err(Error::OldChunkRestoringError( 222 + "Expected left nodes in height proofs to be kvhash nodes".to_string(), 223 + )); 224 + } 225 + verify_height_tree(&child.tree)? + 1 226 + } 227 + None => 1, 228 ~ }) |
the following explicit lifetimes could be elided: 'a: merk/src/proofs/chunk/chunk.rs#L43
warning: the following explicit lifetimes could be elided: 'a --> merk/src/proofs/chunk/chunk.rs:43:6 | 43 | impl<'a, S> RefWalker<'a, S> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 43 - impl<'a, S> RefWalker<'a, S> 43 + impl<S> RefWalker<'_, S> |
module has the same name as its containing module: merk/src/proofs/chunk.rs#L5
warning: module has the same name as its containing module --> merk/src/proofs/chunk.rs:5:1 | 5 | pub mod chunk; | ^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception = note: `#[warn(clippy::module_inception)]` on by default
this function has too many arguments (8/7): merk/src/merk/mod.rs#L660
warning: this function has too many arguments (8/7) --> merk/src/merk/mod.rs:660:5 | 660 | / fn verify_link( 661 | | &self, 662 | | link: &Link, 663 | | parent_key: &[u8], ... | 668 | | grove_version: &GroveVersion, 669 | | ) { | |_____^ | = 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#L600
warning: very complex type used. Consider factoring parts into `type` definitions --> merk/src/merk/mod.rs:600:10 | 600 | ) -> (BTreeMap<Vec<u8>, CryptoHash>, BTreeMap<Vec<u8>, Vec<u8>>) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
the following explicit lifetimes could be elided: 'a: merk/src/merk/mod.rs#L192
warning: the following explicit lifetimes could be elided: 'a --> merk/src/merk/mod.rs:192:6 | 192 | impl<'a, I: RawIterator> KVIterator<'a, I> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 192 - impl<'a, I: RawIterator> KVIterator<'a, I> { 192 + impl<I: RawIterator> KVIterator<'_, I> { |
the following explicit lifetimes could be elided: 's: merk/src/merk/source.rs#L37
warning: the following explicit lifetimes could be elided: 's --> merk/src/merk/source.rs:37:6 | 37 | impl<'s, 'db, S> Fetch for MerkSource<'s, S> | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 37 - impl<'s, 'db, S> Fetch for MerkSource<'s, S> 37 + impl<'db, S> Fetch for MerkSource<'_, S> |
the following explicit lifetimes could be elided: 's: merk/src/merk/source.rs#L28
warning: the following explicit lifetimes could be elided: 's --> merk/src/merk/source.rs:28:6 | 28 | impl<'s, S> Clone for MerkSource<'s, S> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 28 - impl<'s, S> Clone for MerkSource<'s, S> { 28 + impl<S> Clone for MerkSource<'_, S> { |
the borrowed expression implements the required traits: merk/src/merk/meta.rs#L37
warning: the borrowed expression implements the required traits --> merk/src/merk/meta.rs:37:26 | 37 | .delete_meta(&key, None) | ^^^^ help: change this to: `key` | = 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
the following explicit lifetimes could be elided: 's: merk/src/merk/meta.rs#L13
warning: the following explicit lifetimes could be elided: 's --> merk/src/merk/meta.rs:13:21 | 13 | pub fn get_meta<'s>(&'s mut self, key: Vec<u8>) -> CostResult<Option<&'s [u8]>, Error> { | ^^ ^^ ^^ | = 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 | 13 - pub fn get_meta<'s>(&'s mut self, key: Vec<u8>) -> CostResult<Option<&'s [u8]>, Error> { 13 + pub fn get_meta(&mut self, key: Vec<u8>) -> CostResult<Option<&[u8]>, Error> { |
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
elided lifetime has a name: merk/src/proofs/query/map.rs#L110
warning: elided lifetime has a name --> merk/src/proofs/query/map.rs:110:72 | 110 | pub fn range<'a, R: RangeBounds<&'a [u8]>>(&'a self, bounds: R) -> Range { | -- lifetime `'a` declared here ^^^^^ this elided lifetime gets resolved as `'a` | = note: `#[warn(elided_named_lifetimes)]` on by default
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; |
the following explicit lifetimes could be elided: 'a: storage/src/rocksdb_storage/storage_context/raw_iterator.rs#L49
warning: the following explicit lifetimes could be elided: 'a --> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:49:6 | 49 | impl<'a> RawIterator for PrefixedRocksDbRawIterator<DBRawIteratorWithThreadMode<'a, Db>> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 49 - impl<'a> RawIterator for PrefixedRocksDbRawIterator<DBRawIteratorWithThreadMode<'a, Db>> { 49 + impl RawIterator for PrefixedRocksDbRawIterator<DBRawIteratorWithThreadMode<'_, Db>> { |
the following explicit lifetimes could be elided: 'db: storage/src/rocksdb_storage/storage_context/batch.rs#L36
warning: the following explicit lifetimes could be elided: 'db --> storage/src/rocksdb_storage/storage_context/batch.rs:36:6 | 36 | impl<'db> Batch for PrefixedRocksDbBatch<'db> { | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 36 - impl<'db> Batch for PrefixedRocksDbBatch<'db> { 36 + impl Batch for PrefixedRocksDbBatch<'_> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_iter.rs#L150
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_iter.rs:150:6 | 150 | impl<'b, B> Clone for CurrentSubtreePathIter<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 150 - impl<'b, B> Clone for CurrentSubtreePathIter<'b, B> { 150 + impl<B> Clone for CurrentSubtreePathIter<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_iter.rs#L45
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_iter.rs:45:6 | 45 | impl<'b, B> Clone for SubtreePathIter<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 45 - impl<'b, B> Clone for SubtreePathIter<'b, B> { 45 + impl<B> Clone for SubtreePathIter<'_, B> { |
the following explicit lifetimes could be elided: 'a: path/src/subtree_path_builder.rs#L178
warning: the following explicit lifetimes could be elided: 'a --> path/src/subtree_path_builder.rs:178:28 | 178 | pub fn owned_from_path<'a, S: AsRef<[u8]>>(path: SubtreePath<'a, S>) -> Self { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 178 - pub fn owned_from_path<'a, S: AsRef<[u8]>>(path: SubtreePath<'a, S>) -> Self { 178 + pub fn owned_from_path<S: AsRef<[u8]>>(path: SubtreePath<'_, S>) -> Self { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_builder.rs#L161
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_builder.rs:161:6 | 161 | impl<'b, B> SubtreePathBuilder<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 161 - impl<'b, B> SubtreePathBuilder<'b, B> { 161 + impl<B> SubtreePathBuilder<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_builder.rs#L97
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_builder.rs:97:6 | 97 | impl<'b, B: AsRef<[u8]>> Eq for SubtreePathBuilder<'b, B> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 97 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePathBuilder<'b, B> {} 97 + impl<B: AsRef<[u8]>> Eq for SubtreePathBuilder<'_, B> {} |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path_builder.rs#L87
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path_builder.rs:87:6 | 87 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 87 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'bl, BL> 87 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePathBuilder<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path_builder.rs#L77
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path_builder.rs:77:6 | 77 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 77 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL> 77 + impl<'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePath<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path_builder.rs#L67
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path_builder.rs:67:6 | 67 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 67 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL> 67 + impl<'br, BL, BR> PartialEq<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'_, BL> |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_builder.rs#L60
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_builder.rs:60:6 | 60 | impl<'b, B: AsRef<[u8]>> Hash for SubtreePathBuilder<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 60 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePathBuilder<'b, B> { 60 + impl<B: AsRef<[u8]>> Hash for SubtreePathBuilder<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path_builder.rs#L49
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path_builder.rs:49:6 | 49 | impl<'b, B> Clone for SubtreePathBuilder<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 49 - impl<'b, B> Clone for SubtreePathBuilder<'b, B> { 49 + impl<B> Clone for SubtreePathBuilder<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path.rs#L214
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path.rs:214:6 | 214 | impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 214 - impl<'b, B: AsRef<[u8]>> Hash for SubtreePath<'b, B> { 214 + impl<B: AsRef<[u8]>> Hash for SubtreePath<'_, B> { |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path.rs#L184
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path.rs:184:6 | 184 | impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {} | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 184 - impl<'b, B: AsRef<[u8]>> Eq for SubtreePath<'b, B> {} 184 + impl<B: AsRef<[u8]>> Eq for SubtreePath<'_, B> {} |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L175
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:175:6 | 175 | impl<'bl, BL> Ord for SubtreePathBuilder<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 175 - impl<'bl, BL> Ord for SubtreePathBuilder<'bl, BL> 175 + impl<BL> Ord for SubtreePathBuilder<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L166
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:166:6 | 166 | impl<'bl, BL> Ord for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 166 - impl<'bl, BL> Ord for SubtreePath<'bl, BL> 166 + impl<BL> Ord for SubtreePath<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L156
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:156:6 | 156 | impl<'bl, 'br, BL, BR> PartialOrd<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 156 - impl<'bl, 'br, BL, BR> PartialOrd<SubtreePathBuilder<'br, BR>> for SubtreePath<'bl, BL> 156 + impl<'br, BL, BR> PartialOrd<SubtreePathBuilder<'br, BR>> for SubtreePath<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L137
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:137:6 | 137 | impl<'bl, 'br, BL, BR> PartialOrd<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 137 - impl<'bl, 'br, BL, BR> PartialOrd<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'bl, BL> 137 + impl<'br, BL, BR> PartialOrd<SubtreePathBuilder<'br, BR>> for SubtreePathBuilder<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L118
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:118:6 | 118 | impl<'bl, 'br, BL, BR> PartialOrd<SubtreePath<'br, BR>> for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 118 - impl<'bl, 'br, BL, BR> PartialOrd<SubtreePath<'br, BR>> for SubtreePath<'bl, BL> 118 + impl<'br, BL, BR> PartialOrd<SubtreePath<'br, BR>> for SubtreePath<'_, BL> |
the following explicit lifetimes could be elided: 'bl: path/src/subtree_path.rs#L101
warning: the following explicit lifetimes could be elided: 'bl --> path/src/subtree_path.rs:101:6 | 101 | impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL> | ^^^ ^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes help: elide the lifetimes | 101 - impl<'bl, 'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'bl, BL> 101 + impl<'br, BL, BR> PartialEq<SubtreePath<'br, BR>> for SubtreePath<'_, BL> |
the following explicit lifetimes could be elided: 'b: path/src/subtree_path.rs#L55
warning: the following explicit lifetimes could be elided: 'b --> path/src/subtree_path.rs:55:6 | 55 | impl<'b, B: AsRef<[u8]>> Display for SubtreePath<'b, B> { | ^^ ^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes = note: `#[warn(clippy::needless_lifetimes)]` on by default help: elide the lifetimes | 55 - impl<'b, B: AsRef<[u8]>> Display for SubtreePath<'b, B> { 55 + impl<B: AsRef<[u8]>> Display for SubtreePath<'_, B> { |
doc list item without indentation: costs/src/context.rs#L182
warning: doc list item without indentation --> costs/src/context.rs:182:5 | 182 | /// accumulator; | ^ | = 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; | +++
Linting
ubuntu-latest pipelines will use ubuntu-24.04 soon. For more details, see https://github.com/actions/runner-images/issues/10636
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/
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/
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/