Skip to content

feat: bidirectional references #490

feat: bidirectional references

feat: bidirectional references #490

GitHub Actions / clippy succeeded Jan 30, 2025 in 1s

clippy

86 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 86
Note 0
Help 0

Versions

  • rustc 1.84.0 (9fc6b4312 2025-01-07)
  • cargo 1.84.0 (66221abde 2024-11-19)
  • clippy 0.1.84 (9fc6b43126 2025-01-07)

Annotations

Check warning on line 942 in grovedb/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/lib.rs:933:5
    |
933 | /     fn verify_merk_and_submerks_in_transaction<'db, B: AsRef<[u8]>, S: StorageContext<'db>>(
934 | |         &'db self,
935 | |         merk: Merk<S>,
936 | |         path: &SubtreePath<B>,
...   |
941 | |         grove_version: &GroveVersion,
942 | |     ) -> Result<VerificationIssues, Error> {
    | |__________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 237 in grovedb/src/operations/proof/verify.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/proof/verify.rs:228:5
    |
228 | /     fn verify_layer_proof<T>(
229 | |         layer_proof: &LayerProof,
230 | |         prove_options: &ProveOptions,
231 | |         query: &PathQuery,
...   |
236 | |         grove_version: &GroveVersion,
237 | |     ) -> Result<CryptoHash, Error>
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 215 in grovedb/src/operations/proof/generate.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/operations/proof/generate.rs:215:74
    |
215 |             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

Check warning on line 178 in grovedb/src/operations/insert/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/insert/mod.rs:169:5
    |
169 | /     fn add_element_on_transaction<'db, B: AsRef<[u8]>>(
170 | |         &'db self,
171 | |         path: SubtreePath<B>,
172 | |         key: &[u8],
...   |
177 | |         grove_version: &GroveVersion,
178 | |     ) -> CostResult<Merk<PrefixedRocksDbTransactionContext<'db>>, Error> {
    | |________________________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 122 in grovedb/src/operations/insert/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/insert/mod.rs:113:5
    |
113 | /     fn insert_on_transaction<'db, 'b, B: AsRef<[u8]>>(
114 | |         &self,
115 | |         path: SubtreePath<'b, B>,
116 | |         key: &[u8],
...   |
121 | |         grove_version: &GroveVersion,
122 | |     ) -> CostResult<(), Error> {
    | |______________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 638 in grovedb/src/operations/get/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/get/query.rs:629:5
    |
629 | /     pub fn query_raw(
630 | |         &self,
631 | |         path_query: &PathQuery,
632 | |         allow_cache: bool,
...   |
637 | |         grove_version: &GroveVersion,
638 | |     ) -> CostResult<(QueryResultElements, u16), Error> {
    | |______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 264 in grovedb/src/operations/get/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/get/query.rs:255:5
    |
255 | /     pub fn query(
256 | |         &self,
257 | |         path_query: &PathQuery,
258 | |         allow_cache: bool,
...   |
263 | |         grove_version: &GroveVersion,
264 | |     ) -> CostResult<(QueryResultElements, u16), Error> {
    | |______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 133 in grovedb/src/operations/get/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/get/query.rs:124:5
    |
124 | /     pub fn query_many_raw(
125 | |         &self,
126 | |         path_queries: &[&PathQuery],
127 | |         allow_cache: bool,
...   |
132 | |         grove_version: &GroveVersion,
133 | |     ) -> CostResult<QueryResultElements, Error>
    | |_______________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 611 in grovedb/src/operations/delete/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/delete/mod.rs:595:5
    |
595 | /     fn delete_internal_on_transaction<B: AsRef<[u8]>>(
596 | |         &self,
597 | |         path: SubtreePath<B>,
598 | |         key: &[u8],
...   |
610 | |         grove_version: &GroveVersion,
611 | |     ) -> CostResult<bool, Error> {
    | |________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 481 in grovedb/src/operations/delete/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/delete/mod.rs:472:5
    |
472 | /     pub fn delete_operation_for_delete_internal<B: AsRef<[u8]>>(
473 | |         &self,
474 | |         path: SubtreePath<B>,
475 | |         key: &[u8],
...   |
480 | |         grove_version: &GroveVersion,
481 | |     ) -> CostResult<Option<QualifiedGroveDbOp>, Error> {
    | |______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 122 in grovedb/src/operations/delete/worst_case.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/delete/worst_case.rs:113:5
    |
113 | /     pub fn worst_case_delete_operation_for_delete<'db, S: Storage<'db>>(
114 | |         path: &KeyInfoPath,
115 | |         key: &KeyInfo,
116 | |         in_parent_tree_type: TreeType,
...   |
121 | |         grove_version: &GroveVersion,
122 | |     ) -> CostResult<QualifiedGroveDbOp, Error> {
    | |______________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 207 in grovedb/src/operations/delete/delete_up_tree.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/delete/delete_up_tree.rs:198:5
    |
198 | /     pub fn add_delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
199 | |         &self,
200 | |         path: SubtreePath<B>,
201 | |         key: &[u8],
...   |
206 | |         grove_version: &GroveVersion,
207 | |     ) -> CostResult<Option<Vec<QualifiedGroveDbOp>>, Error> {
    | |___________________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 175 in grovedb/src/operations/delete/delete_up_tree.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/delete/delete_up_tree.rs:166:5
    |
166 | /     pub fn delete_operations_for_delete_up_tree_while_empty<B: AsRef<[u8]>>(
167 | |         &self,
168 | |         path: SubtreePath<B>,
169 | |         key: &[u8],
...   |
174 | |         grove_version: &GroveVersion,
175 | |     ) -> CostResult<Vec<QualifiedGroveDbOp>, Error> {
    | |___________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 147 in grovedb/src/operations/delete/average_case.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/operations/delete/average_case.rs:138:5
    |
138 | /     pub fn average_case_delete_operation_for_delete<'db, S: Storage<'db>>(
139 | |         path: &KeyInfoPath,
140 | |         key: &KeyInfo,
141 | |         in_parent_tree_type: TreeType,
...   |
146 | |         grove_version: &GroveVersion,
147 | |     ) -> CostResult<QualifiedGroveDbOp, Error> {
    | |______________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 254 in grovedb/src/merk_cache.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/merk_cache.rs:254:33
    |
254 | ...                   &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

Check warning on line 114 in grovedb/src/merk_cache.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/merk_cache.rs:114:59
    |
114 |                     Element::get(&merk, parent_key, true, &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

Check warning on line 114 in grovedb/src/merk_cache.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/merk_cache.rs:114:34
    |
114 |                     Element::get(&merk, parent_key, true, &self.version)
    |                                  ^^^^^ help: change this to: `merk`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 730 in grovedb/src/element/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (12/7)

warning: this function has too many arguments (12/7)
   --> grovedb/src/element/query.rs:717:5
    |
717 | /     fn query_item(
718 | |         storage: &RocksDbStorage,
719 | |         item: &QueryItem,
720 | |         results: &mut Vec<QueryResultElement>,
...   |
729 | |         grove_version: &GroveVersion,
730 | |     ) -> CostResult<(), Error> {
    | |______________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 311 in grovedb/src/element/query.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (8/7)

warning: this function has too many arguments (8/7)
   --> grovedb/src/element/query.rs:302:5
    |
302 | /     pub fn get_query_apply_function(
303 | |         storage: &RocksDbStorage,
304 | |         path: &[&[u8]],
305 | |         sized_query: &SizedQuery,
...   |
310 | |         grove_version: &GroveVersion,
311 | |     ) -> CostResult<(QueryResultElements, u16), Error> {
    | |______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 368 in grovedb/src/element/insert.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/element/insert.rs:368:32
    |
368 |             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

Check warning on line 346 in grovedb/src/debugger.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/debugger.rs:346:29
    |
346 | ...                   &tx,
    |                       ^^^ help: change this to: `tx`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Check warning on line 631 in grovedb/src/bidirectional_references.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'db, 'c

warning: the following explicit lifetimes could be elided: 'db, 'c
   --> grovedb/src/bidirectional_references.rs:631:28
    |
631 | fn get_backward_references<'db, 'c>(
    |                            ^^^  ^^
632 |     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
    |
631 ~ fn get_backward_references(
632 ~     merk: &mut MerkHandle<'_, '_>,
    |

Check warning on line 590 in grovedb/src/bidirectional_references.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'db, 'c

warning: the following explicit lifetimes could be elided: 'db, 'c
   --> grovedb/src/bidirectional_references.rs:590:27
    |
590 | fn add_backward_reference<'db, 'c>(
    |                           ^^^  ^^
591 |     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
    |
590 ~ fn add_backward_reference(
591 ~     target_merk: &mut MerkHandle<'_, '_>,
    |

Check warning on line 551 in grovedb/src/bidirectional_references.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

the following explicit lifetimes could be elided: 'db, 'c

warning: the following explicit lifetimes could be elided: 'db, 'c
   --> grovedb/src/bidirectional_references.rs:551:35
    |
551 | fn get_backward_references_bitvec<'db, 'c>(
    |                                   ^^^  ^^
552 |     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
    |
551 ~ fn get_backward_references_bitvec(
552 ~     merk: &mut MerkHandle<'_, '_>,
    |

Check warning on line 345 in grovedb/src/bidirectional_references.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this expression creates a reference which is immediately dereferenced by the compiler

warning: this expression creates a reference which is immediately dereferenced by the compiler
   --> grovedb/src/bidirectional_references.rs:345:75
    |
345 |                     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