Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: switch to bincode 2, clean up dependencies #288

Merged
merged 7 commits into from
Apr 5, 2024

a few more updates

9a440eb
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

refactor: switch to bincode 2, clean up dependencies #288

a few more updates
9a440eb
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Apr 5, 2024 in 0s

clippy

17 warnings

Details

Results

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

Versions

  • rustc 1.77.1 (7cf61ebde 2024-03-27)
  • cargo 1.77.1 (e52e36006 2024-03-26)
  • clippy 0.1.77 (7cf61eb 2024-03-27)

Annotations

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

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> grovedb/src/lib.rs:943:10
    |
943 |     ) -> 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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> grovedb/src/lib.rs:873:10
    |
873 |     ) -> 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

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

See this annotation in the file changed.

@github-actions github-actions / clippy

very complex type used. Consider factoring parts into `type` definitions

warning: very complex type used. Consider factoring parts into `type` definitions
   --> grovedb/src/lib.rs:847:10
    |
847 |     ) -> Result<HashMap<Vec<Vec<u8>>, (CryptoHash, CryptoHash, CryptoHash)>, Error> {
    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity
    = note: `#[warn(clippy::type_complexity)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

warning: this function has too many arguments (9/7)
   --> grovedb/src/operations/proof/generate.rs:488:5
    |
488 | /     fn generate_and_store_merk_proof<'a, S, B>(
489 | |         &self,
490 | |         path: &SubtreePath<B>,
491 | |         subtree: &'a Merk<S>,
...   |
497 | |         key: &[u8],
498 | |     ) -> CostResult<(Option<u16>, Option<u16>), Error>
    | |______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 181 in grovedb/src/operations/proof/generate.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/generate.rs:172:5
    |
172 | /     fn prove_subqueries(
173 | |         &self,
174 | |         proofs: &mut Vec<u8>,
175 | |         path: Vec<&[u8]>,
...   |
180 | |         is_verbose: bool,
181 | |     ) -> CostResult<(), Error> {
    | |______________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

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

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (11/7)

warning: this function has too many arguments (11/7)
   --> grovedb/src/element/query.rs:572:5
    |
572 | /     fn query_item(
573 | |         storage: &RocksDbStorage,
574 | |         item: &QueryItem,
575 | |         results: &mut Vec<QueryResultElement>,
...   |
583 | |         add_element_function: fn(PathQueryPushArgs) -> CostResult<(), Error>,
584 | |     ) -> 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

Check warning on line 321 in grovedb/src/element/helpers.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this `let...else` may be rewritten with the `?` operator

warning: this `let...else` may be rewritten with the `?` operator
   --> grovedb/src/element/helpers.rs:319:9
    |
319 | /         let Some(value_cost) = self.get_specialized_cost().ok() else {
320 | |             return None;
321 | |         };
    | |__________^ help: replace it with: `let value_cost = self.get_specialized_cost().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

Check warning on line 248 in grovedb/src/element/helpers.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

writing `&Vec` instead of `&[_]` involves a new object where a slice will do

warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
   --> grovedb/src/element/helpers.rs:248:14
    |
248 |         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

Check warning on line 555 in grovedb/src/batch/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

writing `&Vec` instead of `&[_]` involves a new object where a slice will do

warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
   --> grovedb/src/batch/mod.rs:555:50
    |
555 |     pub fn verify_consistency_of_operations(ops: &Vec<GroveDbOp>) -> GroveDbOpConsistencyResults {
    |                                                  ^^^^^^^^^^^^^^^ help: change this to: `&[GroveDbOp]`
    |
    = 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

Check warning on line 12 in grovedb/src/versioning.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `read_proof_version` is never used

warning: function `read_proof_version` is never used
  --> grovedb/src/versioning.rs:12:8
   |
12 | pub fn read_proof_version(mut bytes: &[u8]) -> Result<u32, Error> {
   |        ^^^^^^^^^^^^^^^^^^

Check warning on line 166 in grovedb/src/replication.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

field `0` is never read

warning: field `0` is never read
   --> grovedb/src/replication.rs:166:26
    |
166 | pub struct RestorerError(String);
    |            ------------- ^^^^^^
    |            |
    |            field in this struct
    |
    = note: `RestorerError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
    = note: `#[warn(dead_code)]` on by default
help: consider changing the field to be of unit type to suppress this warning while preserving the field numbering, or remove the field
    |
166 | pub struct RestorerError(());
    |                          ~~

Check warning on line 834 in merk/src/tree/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)
   --> 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

Check warning on line 367 in merk/src/tree/walk/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)
   --> 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

Check warning on line 728 in merk/src/tree/ops.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (9/7)

warning: this function has too many arguments (9/7)
   --> merk/src/tree/ops.rs:718:5
    |
718 | /     fn recurse<K: AsRef<[u8]>, C, V, U, R>(
719 | |         self,
720 | |         batch: &MerkBatch<K>,
721 | |         mid: usize,
...   |
727 | |         section_removal_bytes: &mut R,
728 | |     ) -> CostResult<(Option<Self>, KeyUpdates), Error>
    | |______________________________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments

Check warning on line 286 in merk/src/merk/apply.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)
   --> 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

Check warning on line 199 in merk/src/merk/apply.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)
   --> 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

Check warning on line 31 in merk/src/tree/fuzz_tests.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

'test' may be misspelled as 'tests'

warning: 'test' may be misspelled as 'tests'
  --> merk/src/tree/fuzz_tests.rs:31:8
   |
31 | #![cfg(tests)]
   |        ^^^^^ help: did you mean: `test`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#maybe_misused_cfg
   = note: `#[warn(clippy::maybe_misused_cfg)]` on by default