fix: just in time update #163
Triggered via pull request
September 27, 2023 06:13
Status
Failure
Total duration
10m 31s
Artifacts
–
Annotations
4 errors and 27 warnings
this method takes 3 arguments but 2 arguments were supplied:
grovedb/src/lib.rs#L982
error[E0061]: this method takes 3 arguments but 2 arguments were supplied
--> grovedb/src/lib.rs:982:22
|
982 | .get_value_and_value_hash(&key, true)
| ^^^^^^^^^^^^^^^^^^^^^^^^------------ an argument of type `std::option::Option<_>` is missing
|
note: method defined here
--> /home/runner/work/grovedb/grovedb/merk/src/merk/get.rs:165:12
|
165 | pub fn get_value_and_value_hash(
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
982 | .get_value_and_value_hash(&key, true, /* value_defined_cost_fn */)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this method takes 3 arguments but 2 arguments were supplied:
grovedb/src/lib.rs#L951
error[E0061]: this method takes 3 arguments but 2 arguments were supplied
--> grovedb/src/lib.rs:951:22
|
951 | .get_value_and_value_hash(&key, true)
| ^^^^^^^^^^^^^^^^^^^^^^^^------------ an argument of type `std::option::Option<_>` is missing
|
note: method defined here
--> /home/runner/work/grovedb/grovedb/merk/src/merk/get.rs:165:12
|
165 | pub fn get_value_and_value_hash(
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
951 | .get_value_and_value_hash(&key, true, /* value_defined_cost_fn */)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
this method takes 3 arguments but 2 arguments were supplied:
grovedb/src/lib.rs#L915
error[E0061]: this method takes 3 arguments but 2 arguments were supplied
--> grovedb/src/lib.rs:915:22
|
915 | .get_value_and_value_hash(&key, true)
| ^^^^^^^^^^^^^^^^^^^^^^^^------------ an argument of type `std::option::Option<_>` is missing
|
note: method defined here
--> /home/runner/work/grovedb/grovedb/merk/src/merk/get.rs:165:12
|
165 | pub fn get_value_and_value_hash(
| ^^^^^^^^^^^^^^^^^^^^^^^^
help: provide the argument
|
915 | .get_value_and_value_hash(&key, true, /* value_defined_cost_fn */)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
Code Coverage
Process completed with exit code 101.
|
unused import: `Error::InternalError`:
grovedb/src/versioning.rs#L5
warning: unused import: `Error::InternalError`
--> grovedb/src/versioning.rs:5:20
|
5 | use crate::{Error, Error::InternalError};
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `VarIntWriter`:
grovedb/src/versioning.rs#L3
warning: unused import: `VarIntWriter`
--> grovedb/src/versioning.rs:3:46
|
3 | use integer_encoding::{VarInt, VarIntReader, VarIntWriter};
| ^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
this `else { if .. }` block can be collapsed:
grovedb/src/batch/mod.rs#L1822
warning: this `else { if .. }` block can be collapsed
--> grovedb/src/batch/mod.rs:1822:16
|
1822 | } else {
| ________________^
1823 | | if new_merk {
1824 | | Ok(Merk::open_empty(storage, MerkType::BaseMerk, false)).wrap_with_cost(cost)
1825 | | } else {
... |
1833 | | }
1834 | | }
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
1822 ~ } else if new_merk {
1823 + Ok(Merk::open_empty(storage, MerkType::BaseMerk, false)).wrap_with_cost(cost)
1824 + } else {
1825 + Merk::open_base(
1826 + storage,
1827 + false,
1828 + Some(&Element::value_defined_cost_for_serialized_value),
1829 + )
1830 + .map_err(|_| Error::CorruptedData("cannot open a the root subtree".to_owned()))
1831 + .add_cost(cost)
1832 + }
|
|
this `impl` can be derived:
merk/src/estimated_costs/average_case_costs.rs#L75
warning: this `impl` can be derived
--> merk/src/estimated_costs/average_case_costs.rs:75:1
|
75 | / impl Default for EstimatedSumTrees {
76 | | fn default() -> Self {
77 | | EstimatedSumTrees::NoSumTrees
78 | | }
79 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it...
|
60 + #[derive(Default)]
61 | pub enum EstimatedSumTrees {
|
help: ...and mark the default variant
|
62 ~ #[default]
63 ~ NoSumTrees,
|
|
this function has too many arguments (8/7):
merk/src/tree/mod.rs#L811
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:811:5
|
811 | / pub fn put_value_with_reference_value_hash_and_value_cost(
812 | | mut self,
813 | | value: Vec<u8>,
814 | | value_hash: CryptoHash,
... |
833 | | >,
834 | | ) -> 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#L344
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:344:5
|
344 | / pub fn put_value_with_reference_value_hash_and_value_cost(
345 | | mut self,
346 | | value: Vec<u8>,
347 | | value_hash: CryptoHash,
... |
366 | | >,
367 | | ) -> 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/ops.rs#L628
warning: this function has too many arguments (9/7)
--> merk/src/tree/ops.rs:628:5
|
628 | / fn recurse<K: AsRef<[u8]>, C, V, U, R>(
629 | | self,
630 | | batch: &MerkBatch<K>,
631 | | mid: usize,
... |
637 | | section_removal_bytes: &mut R,
638 | | ) -> 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/merk/apply.rs#L277
warning: this function has too many arguments (8/7)
--> merk/src/merk/apply.rs:277:5
|
277 | / pub fn apply_unchecked<KB, KA, C, V, U, R>(
278 | | &mut self,
279 | | batch: &MerkBatch<KB>,
280 | | aux: &AuxMerkBatch<KA>,
... |
285 | | section_removal_bytes: &mut R,
286 | | ) -> 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):
merk/src/merk/apply.rs#L176
warning: this function has too many arguments (8/7)
--> merk/src/merk/apply.rs:176:5
|
176 | / pub fn apply_with_costs_just_in_time_value_update<KB, KA>(
177 | | &mut self,
178 | | batch: &MerkBatch<KB>,
179 | | aux: &AuxMerkBatch<KA>,
... |
198 | | >,
199 | | ) -> 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
|
unused variable: `value_defined_cost_fn`:
merk/src/tree/ops.rs#L156
warning: unused variable: `value_defined_cost_fn`
--> merk/src/tree/ops.rs:156:9
|
156 | value_defined_cost_fn: Option<&impl Fn(&[u8]) -> Option<ValueDefinedCostType>>,
| ^^^^^^^^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_value_defined_cost_fn`
|
= note: `#[warn(unused_variables)]` on by default
|
unused import: `CostContext`:
merk/src/tree/walk/mod.rs#L39
warning: unused import: `CostContext`
--> merk/src/tree/walk/mod.rs:39:43
|
39 | use grovedb_costs::{cost_return_on_error, CostContext, CostResult, CostsExt, OperationCost};
| ^^^^^^^^^^^
|
unused import: `crate::tree::kv::ValueDefinedCostType`:
merk/src/tree/commit.rs#L38
warning: unused import: `crate::tree::kv::ValueDefinedCostType`
--> merk/src/tree/commit.rs:38:5
|
38 | use crate::tree::kv::ValueDefinedCostType;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused imports: `StorageCost`, `removal::StorageRemovedBytes`:
merk/src/tree/commit.rs#L32
warning: unused imports: `StorageCost`, `removal::StorageRemovedBytes`
--> merk/src/tree/commit.rs:32:35
|
32 | use grovedb_costs::storage_cost::{removal::StorageRemovedBytes, StorageCost};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
|
unused imports: `Commit`, `Fetch`, `Op as ProofOp`:
merk/src/merk/mod.rs#L66
warning: unused imports: `Commit`, `Fetch`, `Op as ProofOp`
--> merk/src/merk/mod.rs:66:44
|
66 | proofs::{query::query_item::QueryItem, Op as ProofOp, Query},
| ^^^^^^^^^^^^^
67 | tree::{
68 | kv::ValueDefinedCostType, AuxMerkBatch, Commit, CryptoHash, Fetch, Op, RefWalker, TreeNode,
| ^^^^^^ ^^^^^
|
unused imports: `StorageCost`, `removal::StorageRemovedBytes`:
merk/src/merk/mod.rs#L56
warning: unused imports: `StorageCost`, `removal::StorageRemovedBytes`
--> merk/src/merk/mod.rs:56:46
|
56 | key_value_cost::KeyValueStorageCost, removal::StorageRemovedBytes, StorageCost,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
|
unused import: `grovedb_costs::storage_cost::key_value_cost::KeyValueStorageCost`:
merk/src/merk/committer.rs#L1
warning: unused import: `grovedb_costs::storage_cost::key_value_cost::KeyValueStorageCost`
--> merk/src/merk/committer.rs:1:5
|
1 | use grovedb_costs::storage_cost::key_value_cost::KeyValueStorageCost;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
unused `std::result::Result` that must be used:
storage/src/rocksdb_storage/storage.rs#L431
warning: unused `std::result::Result` that must be used
--> storage/src/rocksdb_storage/storage.rs:431:13
|
431 | self.db.delete(iter.key().expect("should have key"));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
431 | let _ = self.db.delete(iter.key().expect("should have key"));
| +++++++
|
the borrowed expression implements the required traits:
storage/src/rocksdb_storage/storage_context/raw_iterator.rs#L172
warning: the borrowed expression implements the required traits
--> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:172:32
|
172 | self.raw_iterator.seek(&self.prefix);
| ^^^^^^^^^^^^ help: change this to: `self.prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
the borrowed expression implements the required traits:
storage/src/rocksdb_storage/storage_context/raw_iterator.rs#L51
warning: the borrowed expression implements the required traits
--> storage/src/rocksdb_storage/storage_context/raw_iterator.rs:51:32
|
51 | self.raw_iterator.seek(&self.prefix);
| ^^^^^^^^^^^^ help: change this to: `self.prefix`
|
= 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
|
using `clone` on type `[u8; 32]` which implements the `Copy` trait:
storage/src/rocksdb_storage/storage_context/context_tx.rs#L314
warning: using `clone` on type `[u8; 32]` which implements the `Copy` trait
--> storage/src/rocksdb_storage/storage_context/context_tx.rs:314:21
|
314 | prefix: self.prefix.clone(),
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `[u8; 32]` which implements the `Copy` trait:
storage/src/rocksdb_storage/storage_context/context_tx.rs#L299
warning: using `clone` on type `[u8; 32]` which implements the `Copy` trait
--> storage/src/rocksdb_storage/storage_context/context_tx.rs:299:21
|
299 | prefix: self.prefix.clone(),
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `[u8; 32]` which implements the `Copy` trait:
storage/src/rocksdb_storage/storage_context/context_no_tx.rs#L282
warning: using `clone` on type `[u8; 32]` which implements the `Copy` trait
--> storage/src/rocksdb_storage/storage_context/context_no_tx.rs:282:21
|
282 | prefix: self.prefix.clone(),
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `[u8; 32]` which implements the `Copy` trait:
storage/src/rocksdb_storage/storage_context/context_no_tx.rs#L268
warning: using `clone` on type `[u8; 32]` which implements the `Copy` trait
--> storage/src/rocksdb_storage/storage_context/context_no_tx.rs:268:21
|
268 | prefix: self.prefix.clone(),
| ^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.prefix`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
= note: `#[warn(clippy::clone_on_copy)]` on by default
|
unused import: `Error::StorageError`:
storage/src/rocksdb_storage/storage.rs#L56
warning: unused import: `Error::StorageError`
--> storage/src/rocksdb_storage/storage.rs:56:5
|
56 | Error::StorageError,
| ^^^^^^^^^^^^^^^^^^^
|
unused imports: `DB`, `Options`:
storage/src/rocksdb_storage/storage.rs#L43
warning: unused imports: `DB`, `Options`
--> storage/src/rocksdb_storage/storage.rs:43:92
|
43 | checkpoint::Checkpoint, ColumnFamily, ColumnFamilyDescriptor, OptimisticTransactionDB, Options,
| ^^^^^^^
44 | Transaction, WriteBatchWithTransaction, DB, DEFAULT_COLUMN_FAMILY_NAME,
| ^^
|
= note: `#[warn(unused_imports)]` on by default
|
this `impl` can be derived:
costs/src/storage_cost/removal.rs#L62
warning: this `impl` can be derived
--> costs/src/storage_cost/removal.rs:62:1
|
62 | / impl Default for StorageRemovedBytes {
63 | | fn default() -> Self {
64 | | NoStorageRemoval
65 | | }
66 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it...
|
53 + #[derive(Default)]
54 | pub enum StorageRemovedBytes {
|
help: ...and mark the default variant
|
55 ~ #[default]
56 ~ NoStorageRemoval,
|
|
Code Coverage
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|