feat: bidirectional references (non-batched operations) #491
Annotations
2 errors and 34 warnings
failed to resolve: could not find `check_grovedb_v0_or_v1_with_cost` in `grovedb_version`:
grovedb/src/reference_path.rs#L643
error[E0433]: failed to resolve: could not find `check_grovedb_v0_or_v1_with_cost` in `grovedb_version`
--> grovedb/src/reference_path.rs:643:22
|
643 | grovedb_version::check_grovedb_v0_or_v1_with_cost!(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ could not find `check_grovedb_v0_or_v1_with_cost` in `grovedb_version`
|
Code Coverage
Process completed with exit code 101.
|
variable does not need to be mutable:
grovedb/src/operations/insert/v1.rs#L31
warning: variable does not need to be mutable
--> grovedb/src/operations/insert/v1.rs:31:9
|
31 | let mut cost = Default::default();
| ----^^^^
| |
| help: remove this `mut`
|
= note: `#[warn(unused_mut)]` on by default
|
unused variable: `batch`:
grovedb/src/operations/insert/v1.rs#L19
warning: unused variable: `batch`
--> grovedb/src/operations/insert/v1.rs:19:5
|
19 | batch: &StorageBatch,
| ^^^^^ help: if this is intentional, prefix it with an underscore: `_batch`
|
unused variable: `transaction`:
grovedb/src/operations/insert/v1.rs#L18
warning: unused variable: `transaction`
--> grovedb/src/operations/insert/v1.rs:18:5
|
18 | transaction: &'db Transaction,
| ^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_transaction`
|
unused variable: `options`:
grovedb/src/operations/insert/v1.rs#L17
warning: unused variable: `options`
--> grovedb/src/operations/insert/v1.rs:17:5
|
17 | options: InsertOptions,
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_options`
|
unused variable: `element`:
grovedb/src/operations/insert/v1.rs#L16
warning: unused variable: `element`
--> grovedb/src/operations/insert/v1.rs:16:5
|
16 | element: Element,
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_element`
|
unused variable: `key`:
grovedb/src/operations/insert/v1.rs#L15
warning: unused variable: `key`
--> grovedb/src/operations/insert/v1.rs:15:5
|
15 | key: &[u8],
| ^^^ help: if this is intentional, prefix it with an underscore: `_key`
|
unused variable: `path`:
grovedb/src/operations/insert/v1.rs#L14
warning: unused variable: `path`
--> grovedb/src/operations/insert/v1.rs:14:5
|
14 | path: SubtreePath<'b, B>,
| ^^^^ help: if this is intentional, prefix it with an underscore: `_path`
|
unused variable: `db`:
grovedb/src/operations/insert/v1.rs#L13
warning: unused variable: `db`
--> grovedb/src/operations/insert/v1.rs:13:5
|
13 | db: &GroveDb,
| ^^ help: if this is intentional, prefix it with an underscore: `_db`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `rocksdb_storage::PrefixedRocksDbTransactionContext`:
grovedb/src/operations/insert/v1.rs#L6
warning: unused import: `rocksdb_storage::PrefixedRocksDbTransactionContext`
--> grovedb/src/operations/insert/v1.rs:6:23
|
6 | use grovedb_storage::{rocksdb_storage::PrefixedRocksDbTransactionContext, StorageBatch};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused import: `grovedb_merk::Merk`:
grovedb/src/operations/insert/v1.rs#L4
warning: unused import: `grovedb_merk::Merk`
--> grovedb/src/operations/insert/v1.rs:4:5
|
4 | use grovedb_merk::Merk;
| ^^^^^^^^^^^^^^^^^^
|
unused import: `cost_return_on_error`:
grovedb/src/operations/insert/v1.rs#L3
warning: unused import: `cost_return_on_error`
--> grovedb/src/operations/insert/v1.rs:3:21
|
3 | use grovedb_costs::{cost_return_on_error, CostResult, CostsExt};
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `std::collections::HashMap`:
grovedb/src/operations/insert/v1.rs#L1
warning: unused import: `std::collections::HashMap`
--> grovedb/src/operations/insert/v1.rs:1:5
|
1 | use std::collections::HashMap;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unexpected `cfg` condition value: `test_utils`:
grovedb/src/element/insert.rs#L549
warning: unexpected `cfg` condition value: `test_utils`
--> grovedb/src/element/insert.rs:549:32
|
549 | #[cfg(all(feature = "minimal", feature = "test_utils"))]
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: `axum`, `bitvec`, `default`, `estimated_costs`, `full`, `grovedb-costs`, `grovedb-merk`, `grovedb-storage`, `grovedb-visualize`, `grovedbg`, `grovedbg-types`, `integer-encoding`, `intmap`, `itertools`, `minimal`, `proof_debug`, `serde`, `tempfile`, `thiserror`, `tokio`, `tokio-util`, `tower-http`, `verify`, `visualize`, and `zip-extensions`
= help: consider adding `test_utils` as a feature in `Cargo.toml`
= 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
|
constants have by default a `'static` lifetime:
grovedb/src/bidirectional_references.rs#L19
warning: constants have by default a `'static` lifetime
--> grovedb/src/bidirectional_references.rs:19:41
|
19 | 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
|
this function has too many arguments (9/7):
merk/src/tree/mod.rs#L943
warning: this function has too many arguments (9/7)
--> merk/src/tree/mod.rs:943:5
|
943 | / pub fn put_value_with_reference_value_hash_and_value_cost(
944 | | mut self,
945 | | value: Vec<u8>,
946 | | value_hash: CryptoHash,
... |
969 | | >,
970 | | ) -> 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#L885
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:885:5
|
885 | / pub fn put_value_and_reference_value_hash(
886 | | mut self,
887 | | value: Vec<u8>,
888 | | value_hash: CryptoHash,
... |
910 | | >,
911 | | ) -> 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#L829
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:829:5
|
829 | / pub fn put_value_with_fixed_cost(
830 | | mut self,
831 | | value: Vec<u8>,
832 | | value_fixed_cost: u32,
... |
854 | | >,
855 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (9/7):
merk/src/tree/walk/mod.rs#L341
warning: this function has too many arguments (9/7)
--> merk/src/tree/walk/mod.rs:341:5
|
341 | / pub fn put_value_with_reference_value_hash_and_value_cost(
342 | | mut self,
343 | | value: Vec<u8>,
344 | | value_hash: CryptoHash,
... |
367 | | >,
368 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (8/7):
merk/src/tree/walk/mod.rs#L295
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:295:5
|
295 | / pub fn put_value_and_reference_value_hash(
296 | | mut self,
297 | | value: Vec<u8>,
298 | | value_hash: CryptoHash,
... |
320 | | >,
321 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (8/7):
merk/src/tree/walk/mod.rs#L249
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:249:5
|
249 | / pub fn put_value_with_fixed_cost(
250 | | mut self,
251 | | value: Vec<u8>,
252 | | value_fixed_cost: u32,
... |
274 | | >,
275 | | ) -> CostResult<Self, Error> {
| |________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (11/7):
merk/src/tree/ops.rs#L733
warning: this function has too many arguments (11/7)
--> merk/src/tree/ops.rs:733:5
|
733 | / fn recurse<K: AsRef<[u8]>, C, V, T, U, R>(
734 | | self,
735 | | batch: &MerkBatch<K>,
736 | | mid: usize,
... |
744 | | grove_version: &GroveVersion,
745 | | ) -> CostResult<(Option<Self>, KeyUpdates), Error>
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (8/7):
merk/src/tree/ops.rs#L415
warning: this function has too many arguments (8/7)
--> merk/src/tree/ops.rs:415:5
|
415 | / fn apply_sorted<K: AsRef<[u8]>, C, V, T, U, R>(
416 | | self,
417 | | batch: &MerkBatch<K>,
418 | | old_specialized_cost: &C,
... |
423 | | grove_version: &GroveVersion,
424 | | ) -> CostResult<(Option<Self>, KeyUpdates), Error>
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (8/7):
merk/src/tree/ops.rs#L235
warning: this function has too many arguments (8/7)
--> merk/src/tree/ops.rs:235:5
|
235 | / fn build<K: AsRef<[u8]>, C, V, T, U, R>(
236 | | batch: &MerkBatch<K>,
237 | | source: S,
238 | | old_tree_cost: &C,
... |
243 | | grove_version: &GroveVersion,
244 | | ) -> CostResult<Option<TreeNode>, Error>
| |____________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
this function has too many arguments (9/7):
merk/src/tree/ops.rs#L148
warning: this function has too many arguments (9/7)
--> merk/src/tree/ops.rs:148:5
|
148 | / pub fn apply_to<K: AsRef<[u8]>, C, V, T, U, R>(
149 | | maybe_tree: Option<Self>,
150 | | batch: &MerkBatch<K>,
151 | | source: S,
... |
157 | | grove_version: &GroveVersion,
158 | | ) -> CostContext<Result<(Option<TreeNode>, KeyUpdates), Error>>
| |___________________________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
module has the same name as its containing module:
merk/src/proofs/chunk.rs#L5
warning: module has the same name as its containing module
--> merk/src/proofs/chunk.rs:5:1
|
5 | pub mod chunk;
| ^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception
= note: `#[warn(clippy::module_inception)]` on by default
|
this function has too many arguments (8/7):
merk/src/merk/mod.rs#L694
warning: this function has too many arguments (8/7)
--> merk/src/merk/mod.rs:694:5
|
694 | / fn verify_link(
695 | | &self,
696 | | link: &Link,
697 | | parent_key: &[u8],
... |
702 | | grove_version: &GroveVersion,
703 | | ) {
| |_____^
|
= 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#L634
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:634:10
|
634 | ) -> (BTreeMap<Vec<u8>, CryptoHash>, BTreeMap<Vec<u8>, Vec<u8>>) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
|
this function has too many arguments (10/7):
merk/src/merk/apply.rs#L322
warning: this function has too many arguments (10/7)
--> merk/src/merk/apply.rs:322:5
|
322 | / pub fn apply_unchecked<KB, KA, C, V, T, U, R>(
323 | | &mut self,
324 | | batch: &MerkBatch<KB>,
325 | | aux: &AuxMerkBatch<KA>,
... |
332 | | grove_version: &GroveVersion,
333 | | ) -> 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#L206
warning: this function has too many arguments (10/7)
--> merk/src/merk/apply.rs:206:5
|
206 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>(
207 | | &mut self,
208 | | batch: &MerkBatch<KB>,
209 | | aux: &AuxMerkBatch<KA>,
... |
235 | | grove_version: &GroveVersion,
236 | | ) -> 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#L418
warning: method `attempt_state_recovery` is never used
--> merk/src/merk/restore.rs:418:8
|
68 | impl<'db, S: StorageContext<'db>> Restorer<S> {
| --------------------------------------------- method in this implementation
...
418 | 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
|