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

receive full address for visualizer #306

Merged
merged 1 commit into from
Jun 20, 2024

receive full address for visualizer

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

receive full address for visualizer #306

receive full address for visualizer
ebaddf5
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Jun 20, 2024 in 0s

clippy

34 warnings

Details

Results

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

Versions

  • rustc 1.79.0 (129f3b996 2024-06-10)
  • cargo 1.79.0 (ffa9cf99a 2024-06-03)
  • clippy 0.1.79 (129f3b9 2024-06-10)

Annotations

Check warning on line 670 in /rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/macros/mod.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unused `std::result::Result` that must be used

warning: unused `std::result::Result` that must be used
  --> grovedb/src/replication.rs:86:13
   |
86 | /             writeln!(
87 | |                 f,
88 | |                 " prefix:{:?} -> path:{:?}",
89 | |                 hex::encode(prefix),
90 | |                 metadata_path_str
91 | |             );
   | |_____________^
   |
   = note: this `Result` may be an `Err` variant, which should be handled
   = note: `#[warn(unused_must_use)]` on by default
   = note: this warning originates in the macro `writeln` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 958 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:958:10
    |
958 |     ) -> 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 888 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:888:10
    |
888 |     ) -> 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 862 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:862:10
    |
862 |     ) -> 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 577 in grovedb/src/operations/proof/verify.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `ToOwned::to_owned()` may be inefficient

warning: assigning the result of `ToOwned::to_owned()` may be inefficient
   --> grovedb/src/operations/proof/verify.rs:577:17
    |
577 |                 *current_value_bytes = subquery_path_result_set[0].value.to_owned();
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_into()`: `subquery_path_result_set[0].value.clone_into(current_value_bytes)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
    = note: `#[warn(clippy::assigning_clones)]` 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 558 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:546:5
    |
546 | /     fn query_item(
547 | |         storage: &RocksDbStorage,
548 | |         item: &QueryItem,
549 | |         results: &mut Vec<QueryResultElement>,
...   |
557 | |         add_element_function: fn(PathQueryPushArgs) -> CostResult<(), Error>,
558 | |     ) -> 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
    = note: `#[warn(clippy::ptr_arg)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / clippy

the borrowed expression implements the required traits

warning: the borrowed expression implements the required traits
  --> grovedb/src/debugger.rs:30:34
   |
30 |         fs::write(&grovedbg_zip, &GROVEDBG_ZIP).expect("cannot crate grovedbg.zip");
   |                                  ^^^^^^^^^^^^^ help: change this to: `GROVEDBG_ZIP`
   |
   = 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

Check warning on line 242 in grovedb/src/batch/estimated_costs/worst_case_costs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `get(&base_path).is_none()`

warning: unnecessary use of `get(&base_path).is_none()`
   --> grovedb/src/batch/estimated_costs/worst_case_costs.rs:242:34
    |
242 |             if self.cached_merks.get(&base_path).is_none() {
    |                ------------------^^^^^^^^^^^^^^^^^^^^^^^^^
    |                |
    |                help: replace it with: `!self.cached_merks.contains(&base_path)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

Check warning on line 217 in grovedb/src/batch/estimated_costs/worst_case_costs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `get(path).is_none()`

warning: unnecessary use of `get(path).is_none()`
   --> grovedb/src/batch/estimated_costs/worst_case_costs.rs:217:30
    |
217 |         if self.cached_merks.get(path).is_none() {
    |            ------------------^^^^^^^^^^^^^^^^^^^
    |            |
    |            help: replace it with: `!self.cached_merks.contains(path)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

Check warning on line 277 in grovedb/src/batch/estimated_costs/average_case_costs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `get(&base_path).is_none()`

warning: unnecessary use of `get(&base_path).is_none()`
   --> grovedb/src/batch/estimated_costs/average_case_costs.rs:277:34
    |
277 |             if self.cached_merks.get(&base_path).is_none() {
    |                ------------------^^^^^^^^^^^^^^^^^^^^^^^^^
    |                |
    |                help: replace it with: `!self.cached_merks.contains_key(&base_path)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check

Check warning on line 231 in grovedb/src/batch/estimated_costs/average_case_costs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

unnecessary use of `get(path).is_none()`

warning: unnecessary use of `get(path).is_none()`
   --> grovedb/src/batch/estimated_costs/average_case_costs.rs:231:30
    |
231 |         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

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 46 in grovedb/src/batch/mode.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

variants `Execute`, `AverageCase`, and `WorstCase` are never constructed

warning: variants `Execute`, `AverageCase`, and `WorstCase` are never constructed
  --> grovedb/src/batch/mode.rs:46:5
   |
45 | pub enum BatchRunMode {
   |          ------------ variants in this enum
46 |     Execute,
   |     ^^^^^^^
47 |     #[cfg(feature = "estimated_costs")]
48 |     AverageCase(HashMap<KeyInfoPath, EstimatedLayerInformation>),
   |     ^^^^^^^^^^^
49 |     #[cfg(feature = "estimated_costs")]
50 |     WorstCase(HashMap<KeyInfoPath, WorstCaseLayerInformation>),
   |     ^^^^^^^^^
   |
   = note: `BatchRunMode` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis

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

See this annotation in the file changed.

@github-actions github-actions / clippy

method `get_batch_run_mode` is never used

warning: method `get_batch_run_mode` is never used
   --> grovedb/src/batch/mod.rs:686:8
    |
683 | trait TreeCache<G, SR> {
    |       --------- method in this trait
...
686 |     fn get_batch_run_mode(&self) -> BatchRunMode;
    |        ^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

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

See this annotation in the file changed.

@github-actions github-actions / clippy

unused import: `net::Ipv4Addr`

warning: unused import: `net::Ipv4Addr`
 --> grovedb/src/debugger.rs:3:15
  |
3 | use std::{fs, net::Ipv4Addr, sync::Weak};
  |               ^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

Check warning on line 77 in merk/src/estimated_costs/average_case_costs.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

duplicated attribute

warning: duplicated attribute
  --> merk/src/estimated_costs/average_case_costs.rs:77:7
   |
77 | #[cfg(feature = "full")]
   |       ^^^^^^^^^^^^^^^^
   |
note: first defined here
  --> merk/src/estimated_costs/average_case_costs.rs:76:7
   |
76 | #[cfg(feature = "full")]
   |       ^^^^^^^^^^^^^^^^
help: remove this attribute
  --> merk/src/estimated_costs/average_case_costs.rs:77:7
   |
77 | #[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

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 386 in merk/src/proofs/query/merge.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> merk/src/proofs/query/merge.rs:385:17
    |
385 | /                 self.default_subquery_branch.subquery =
386 | |                     other_default_subquery_branch.subquery.clone();
    | |__________________________________________________________________^ help: use `clone_from()`: `self.default_subquery_branch.subquery.clone_from(&other_default_subquery_branch.subquery)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

Check warning on line 337 in merk/src/proofs/query/merge.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

assigning the result of `Clone::clone()` may be inefficient

warning: assigning the result of `Clone::clone()` may be inefficient
   --> merk/src/proofs/query/merge.rs:336:25
    |
336 | /                         self.default_subquery_branch.subquery =
337 | |                             other_default_subquery_branch.subquery.clone();
    | |__________________________________________________________________________^ help: use `clone_from()`: `self.default_subquery_branch.subquery.clone_from(&other_default_subquery_branch.subquery)`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones