feat!: proof system v1 (from v0.1) #532
grovedb.yml
on: pull_request
Tests
8m 3s
Linting
1m 49s
Formatting
17s
Compilation errors
6m 5s
Dependencies security audit
8s
Annotations
2 errors and 122 warnings
Compilation errors
Process completed with exit code 101.
|
Tests
Process completed with exit code 101.
|
Dependencies security audit
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Dependencies security audit
The following actions uses Node.js version which is deprecated and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/audit-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Dependencies security audit
2 warnings found!
|
Dependencies security audit
Unknown warning kind unsound found, please, file a bug
|
Formatting
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Formatting
The following actions uses Node.js version which is deprecated and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Formatting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
unused `std::result::Result` that must be used:
/rustc/129f3b9964af4d4a709d1383930ade12dfe7c081/library/core/src/macros/mod.rs#L670
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)
|
very complex type used. Consider factoring parts into `type` definitions:
grovedb/src/lib.rs#L957
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:957:10
|
957 | ) -> 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
|
very complex type used. Consider factoring parts into `type` definitions:
grovedb/src/lib.rs#L887
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:887:10
|
887 | ) -> 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
|
very complex type used. Consider factoring parts into `type` definitions:
grovedb/src/lib.rs#L861
warning: very complex type used. Consider factoring parts into `type` definitions
--> grovedb/src/lib.rs:861:10
|
861 | ) -> 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
|
length comparison to zero:
grovedb/src/reference_path.rs#L222
warning: length comparison to zero
--> grovedb/src/reference_path.rs:222:76
|
222 | if usize::from(no_of_elements_to_keep) > current_path.len() || current_path.len() == 0 {
| ^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `current_path.is_empty()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero
= note: `#[warn(clippy::len_zero)]` on by default
|
redundant closure:
grovedb/src/reference_path.rs#L92
warning: redundant closure
--> grovedb/src/reference_path.rs:92:14
|
92 | .map(|segment| hex::encode(segment))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `hex::encode`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
grovedb/src/reference_path.rs#L90
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> grovedb/src/reference_path.rs:90:23
|
90 | fn display_path(path: &Vec<Vec<u8>>) -> String {
| ^^^^^^^^^^^^^ help: change this to: `&[Vec<u8>]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L420
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:420:41
|
420 | map.entry(last).or_insert_with(Vec::new).push(key);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
redundant pattern matching, consider using `is_some()`:
grovedb/src/query_result_type.rs#L418
warning: redundant pattern matching, consider using `is_some()`
--> grovedb/src/query_result_type.rs:418:24
|
418 | if let Some(_) = path.pop() {
| -------^^^^^^^------------- help: try: `if path.pop().is_some()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching
= note: `#[warn(clippy::redundant_pattern_matching)]` on by default
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L345
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:345:37
|
345 | map.entry(last).or_insert_with(Vec::new).push(element);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L326
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:326:26
|
326 | .or_insert_with(BTreeMap::new)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L308
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:308:22
|
308 | .or_insert_with(BTreeMap::new)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert_with` to construct default value:
grovedb/src/query_result_type.rs#L291
warning: use of `or_insert_with` to construct default value
--> grovedb/src/query_result_type.rs:291:37
|
291 | map.entry(last).or_insert_with(Vec::new).push(key);
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
the borrowed expression implements the required traits:
grovedb/src/query_result_type.rs#L116
warning: the borrowed expression implements the required traits
--> grovedb/src/query_result_type.rs:116:78
|
116 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/query_result_type.rs#L114
warning: the borrowed expression implements the required traits
--> grovedb/src/query_result_type.rs:114:21
|
114 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
redundant closure:
grovedb/src/query/mod.rs#L463
warning: redundant closure
--> grovedb/src/query/mod.rs:463:22
|
463 | .map(|conditional_subquery_branches| Cow::Borrowed(conditional_subquery_branches)),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Cow::Borrowed`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
unneeded `return` statement:
grovedb/src/query/mod.rs#L439
warning: unneeded `return` statement
--> grovedb/src/query/mod.rs:439:9
|
439 | return false;
| ^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
439 - return false;
439 + false
|
|
manual implementation of `Option::map`:
grovedb/src/query/mod.rs#L346
warning: manual implementation of `Option::map`
--> grovedb/src/query/mod.rs:346:29
|
346 | / ... if let Some(subquery) = &query.default_subquery_branch.subquery {
347 | | ... Some(InternalCowItemsQuery::from_query(subquery))
348 | | ... } else {
349 | | ... None
350 | | ... }
| |_______________________^ help: try: `query.default_subquery_branch.subquery.as_ref().map(|subquery| InternalCowItemsQuery::from_query(subquery))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
|
manual implementation of `Option::map`:
grovedb/src/query/mod.rs#L311
warning: manual implementation of `Option::map`
--> grovedb/src/query/mod.rs:311:41
|
311 | / ... if let Some(subquery) = &subquery_branch.subquery {
312 | | ... Some(InternalCowItemsQuery::from_query(subquery))
313 | | ... } else {
314 | | ... None
315 | | ... }
| |_______________________^ help: try: `subquery_branch.subquery.as_ref().map(|subquery| InternalCowItemsQuery::from_query(subquery))`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map
= note: `#[warn(clippy::manual_map)]` on by default
|
the following explicit lifetimes could be elided: 'a:
grovedb/src/query/mod.rs#L288
warning: the following explicit lifetimes could be elided: 'a
--> grovedb/src/query/mod.rs:288:32
|
288 | pub fn query_items_at_path<'a>(&'a self, path: &[&[u8]]) -> Option<InternalCowItemsQuery> {
| ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes
= note: `#[warn(clippy::needless_lifetimes)]` on by default
help: elide the lifetimes
|
288 - pub fn query_items_at_path<'a>(&'a self, path: &[&[u8]]) -> Option<InternalCowItemsQuery> {
288 + pub fn query_items_at_path(&self, path: &[&[u8]]) -> Option<InternalCowItemsQuery> {
|
|
the borrowed expression implements the required traits:
grovedb/src/query/mod.rs#L55
warning: the borrowed expression implements the required traits
--> grovedb/src/query/mod.rs:55:78
|
55 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/query/mod.rs#L53
warning: the borrowed expression implements the required traits
--> grovedb/src/query/mod.rs:53:21
|
53 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
parameter is only used in recursion:
grovedb/src/operations/proof/verify.rs#L209
warning: parameter is only used in recursion
--> grovedb/src/operations/proof/verify.rs:209:9
|
209 | options: &VerifyOptions,
| ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_options`
|
note: parameter used here
--> grovedb/src/operations/proof/verify.rs:278:37
|
278 | ... options,
| ^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion
|
parameter is only used in recursion:
grovedb/src/operations/proof/verify.rs#L204
warning: parameter is only used in recursion
--> grovedb/src/operations/proof/verify.rs:204:9
|
204 | prove_options: &ProveOptions,
| ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_prove_options`
|
note: parameter used here
--> grovedb/src/operations/proof/verify.rs:273:37
|
273 | ... prove_options,
| ^^^^^^^^^^^^^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#only_used_in_recursion
= note: `#[warn(clippy::only_used_in_recursion)]` on by default
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/verify.rs#L317
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/verify.rs:317:25
|
317 | limit_left.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = limit_left.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/verify.rs#L255
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/verify.rs:255:13
|
255 | limit_left.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = limit_left.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
|
the borrowed expression implements the required traits:
grovedb/src/operations/proof/util.rs#L158
warning: the borrowed expression implements the required traits
--> grovedb/src/operations/proof/util.rs:158:78
|
158 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/operations/proof/util.rs#L156
warning: the borrowed expression implements the required traits
--> grovedb/src/operations/proof/util.rs:156:21
|
156 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L93
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:93:9
|
93 | write!(f, " proof: {}\n", hex::encode(self.proof))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
93 - write!(f, " proof: {}\n", hex::encode(self.proof))?;
93 + writeln!(f, " proof: {}", hex::encode(self.proof))?;
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L88
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:88:9
|
88 | / write!(
89 | | f,
90 | | " value: {},\n",
91 | | element_hex_to_ascii(self.value.as_ref())
92 | | )?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
88 ~ writeln!(
89 | f,
90 ~ " value: {},",
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L87
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:87:9
|
87 | write!(f, " key: {},\n", hex_to_ascii(&self.key))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
87 - write!(f, " key: {},\n", hex_to_ascii(&self.key))?;
87 + writeln!(f, " key: {},", hex_to_ascii(&self.key))?;
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L78
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:78:9
|
78 | / write!(
79 | | f,
80 | | " path: [{}],\n",
81 | | self.path
... |
85 | | .join(", ")
86 | | )?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
78 ~ writeln!(
79 | f,
80 ~ " path: [{}],",
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L77
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:77:9
|
77 | write!(f, "ProvedPathKeyValue {{\n")?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
77 - write!(f, "ProvedPathKeyValue {{\n")?;
77 + writeln!(f, "ProvedPathKeyValue {{")?;
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L55
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:55:9
|
55 | write!(f, " proof: {}\n", hex::encode(self.proof))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
55 - write!(f, " proof: {}\n", hex::encode(self.proof))?;
55 + writeln!(f, " proof: {}", hex::encode(self.proof))?;
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L50
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:50:9
|
50 | / write!(
51 | | f,
52 | | " value: {},\n",
53 | | optional_element_hex_to_ascii(self.value.as_ref())
54 | | )?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
50 ~ writeln!(
51 | f,
52 ~ " value: {},",
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L49
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:49:9
|
49 | write!(f, " key: {},\n", hex_to_ascii(&self.key))?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
49 - write!(f, " key: {},\n", hex_to_ascii(&self.key))?;
49 + writeln!(f, " key: {},", hex_to_ascii(&self.key))?;
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L40
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:40:9
|
40 | / write!(
41 | | f,
42 | | " path: [{}],\n",
43 | | self.path
... |
47 | | .join(", ")
48 | | )?;
| |_________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!` instead
|
40 ~ writeln!(
41 | f,
42 ~ " path: [{}],",
|
|
using `write!()` with a format string that ends in a single newline:
grovedb/src/operations/proof/util.rs#L39
warning: using `write!()` with a format string that ends in a single newline
--> grovedb/src/operations/proof/util.rs:39:9
|
39 | write!(f, "ProvedPathKeyValue {{\n")?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
= note: `#[warn(clippy::write_with_newline)]` on by default
help: use `writeln!` instead
|
39 - write!(f, "ProvedPathKeyValue {{\n")?;
39 + writeln!(f, "ProvedPathKeyValue {{")?;
|
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
grovedb/src/operations/proof/generate.rs#L504
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> grovedb/src/operations/proof/generate.rs:504:22
|
504 | query_items: &Vec<QueryItem>,
| ^^^^^^^^^^^^^^^ help: change this to: `&[QueryItem]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/generate.rs#L486
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/generate.rs:486:13
|
486 | overall_limit.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = overall_limit.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
|
deref which would be done by auto-deref:
grovedb/src/operations/proof/generate.rs#L482
warning: deref which would be done by auto-deref
--> grovedb/src/operations/proof/generate.rs:482:43
|
482 | .map(|a| hex_to_ascii(*a))
| ^^ help: try: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/generate.rs#L457
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/generate.rs:457:33
|
457 | ... overall_limit.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = overall_limit.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/generate.rs#L422
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/generate.rs:422:33
|
422 | ... overall_limit.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = overall_limit.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
|
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`:
grovedb/src/operations/proof/generate.rs#L416
warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> grovedb/src/operations/proof/generate.rs:416:33
|
416 | ... overall_limit.as_mut().map(|limit| *limit -= 1);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| help: try: `if let Some(limit) = overall_limit.as_mut() { ... }`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `#[warn(clippy::option_map_unit_fn)]` on by default
|
deref which would be done by auto-deref:
grovedb/src/operations/proof/generate.rs#L358
warning: deref which would be done by auto-deref
--> grovedb/src/operations/proof/generate.rs:358:39
|
358 | .map(|a| hex_to_ascii(*a))
| ^^ help: try: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
|
deref which would be done by auto-deref:
grovedb/src/operations/proof/generate.rs#L316
warning: deref which would be done by auto-deref
--> grovedb/src/operations/proof/generate.rs:316:47
|
316 | .map(|a| hex_to_ascii(*a))
| ^^ help: try: `a`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
|
the borrowed expression implements the required traits:
grovedb/src/operations/proof/generate.rs#L178
warning: the borrowed expression implements the required traits
--> grovedb/src/operations/proof/generate.rs:178:78
|
178 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/operations/proof/generate.rs#L176
warning: the borrowed expression implements the required traits
--> grovedb/src/operations/proof/generate.rs:176:21
|
176 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/element/mod.rs#L181
warning: the borrowed expression implements the required traits
--> grovedb/src/element/mod.rs:181:78
|
181 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/element/mod.rs#L179
warning: the borrowed expression implements the required traits
--> grovedb/src/element/mod.rs:179:21
|
179 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
redundant closure:
grovedb/src/element/mod.rs#L166
warning: redundant closure
--> grovedb/src/element/mod.rs:166:53
|
166 | .map_or("None".to_string(), |k| hex::encode(k)),
| ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `hex::encode`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
redundant closure:
grovedb/src/element/mod.rs#L144
warning: redundant closure
--> grovedb/src/element/mod.rs:144:53
|
144 | .map_or("None".to_string(), |k| hex::encode(k)),
| ^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `hex::encode`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
|
this function has too many arguments (11/7):
grovedb/src/element/query.rs#L695
warning: this function has too many arguments (11/7)
--> grovedb/src/element/query.rs:695:5
|
695 | / fn query_item(
696 | | storage: &RocksDbStorage,
697 | | item: &QueryItem,
698 | | results: &mut Vec<QueryResultElement>,
... |
706 | | add_element_function: fn(PathQueryPushArgs) -> CostResult<(), Error>,
707 | | ) -> 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
|
the borrowed expression implements the required traits:
grovedb/src/element/query.rs#L253
warning: the borrowed expression implements the required traits
--> grovedb/src/element/query.rs:253:78
|
253 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
grovedb/src/element/query.rs#L251
warning: the borrowed expression implements the required traits
--> grovedb/src/element/query.rs:251:21
|
251 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
deref which would be done by auto-deref:
grovedb/src/element/query.rs#L207
warning: deref which would be done by auto-deref
--> grovedb/src/element/query.rs:207:39
|
207 | .map(|p| hex_to_ascii(*p))
| ^^ help: try: `p`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref
= note: `#[warn(clippy::explicit_auto_deref)]` on by default
|
redundant closure:
grovedb/src/element/query.rs#L199
warning: redundant closure
--> grovedb/src/element/query.rs:199:49
|
199 | self.key.map_or("None".to_string(), |k| hex_to_ascii(k))
| ^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `hex_to_ascii`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure
= note: `#[warn(clippy::redundant_closure)]` on by default
|
useless use of `format!`:
grovedb/src/element/query.rs#L170
warning: useless use of `format!`
--> grovedb/src/element/query.rs:170:22
|
170 | let mut output = format!("SubqueryBranch {{\n");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"SubqueryBranch {\n".to_string()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format
= note: `#[warn(clippy::useless_format)]` on by default
|
this `let...else` may be rewritten with the `?` operator:
grovedb/src/element/helpers.rs#L361
warning: this `let...else` may be rewritten with the `?` operator
--> grovedb/src/element/helpers.rs:361:9
|
361 | / let Some(value_cost) = self.get_specialized_cost().ok() else {
362 | | return None;
363 | | };
| |__________^ 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
|
writing `&Vec` instead of `&[_]` involves a new object where a slice will do:
grovedb/src/element/helpers.rs#L290
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> grovedb/src/element/helpers.rs:290:14
|
290 | 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
|
the borrowed expression implements the required traits:
grovedb/src/debugger.rs#L30
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
|
usage of `contains_key` followed by `insert` on a `HashMap`:
grovedb/src/batch/estimated_costs/average_case_costs.rs#L277
warning: usage of `contains_key` followed by `insert` on a `HashMap`
--> grovedb/src/batch/estimated_costs/average_case_costs.rs:277:13
|
277 | / if !self.cached_merks.contains_key(&base_path) {
278 | | GroveDb::add_average_case_get_merk_at_path::<RocksDbStorage>(
279 | | &mut cost,
280 | | &base_path,
... |
287 | | .insert(base_path, estimated_layer_info.is_sum_tree);
288 | | }
| |_____________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry
= note: `#[warn(clippy::map_entry)]` on by default
help: try
|
277 ~ self.cached_merks.entry(base_path).or_insert_with(|| {
278 + GroveDb::add_average_case_get_merk_at_path::<RocksDbStorage>(
279 + &mut cost,
280 + &base_path,
281 + estimated_layer_info
282 + .estimated_layer_count
283 + .estimated_to_be_empty(),
284 + estimated_layer_info.is_sum_tree,
285 + );
286 + estimated_layer_info.is_sum_tree
287 + });
|
|
unnecessary use of `get(path).is_none()`:
grovedb/src/batch/estimated_costs/average_case_costs.rs#L231
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
|
function `prepend_version_to_bytes` is never used:
grovedb/src/versioning.rs#L32
warning: function `prepend_version_to_bytes` is never used
--> grovedb/src/versioning.rs:32:15
|
32 | pub(crate) fn prepend_version_to_bytes(mut bytes: Vec<u8>, version: u32) -> Result<Vec<u8>, Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^
|
function `read_and_consume_proof_version` is never used:
grovedb/src/versioning.rs#L21
warning: function `read_and_consume_proof_version` is never used
--> grovedb/src/versioning.rs:21:8
|
21 | pub fn read_and_consume_proof_version(bytes: &[u8]) -> Result<(u32, &[u8]), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
function `read_proof_version` is never used:
grovedb/src/versioning.rs#L12
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> {
| ^^^^^^^^^^^^^^^^^^
|
constant `PROOF_VERSION` is never used:
grovedb/src/versioning.rs#L7
warning: constant `PROOF_VERSION` is never used
--> grovedb/src/versioning.rs:7:18
|
7 | pub(crate) const PROOF_VERSION: u32 = 1;
| ^^^^^^^^^^^^^
|
type alias `HasSubqueries` is never used:
grovedb/src/query/mod.rs#L35
warning: type alias `HasSubqueries` is never used
--> grovedb/src/query/mod.rs:35:10
|
35 | pub type HasSubqueries = bool;
| ^^^^^^^^^^^^^
|
type alias `LeftToRight` is never used:
grovedb/src/query/mod.rs#L32
warning: type alias `LeftToRight` is never used
--> grovedb/src/query/mod.rs:32:10
|
32 | pub type LeftToRight = bool;
| ^^^^^^^^^^^
|
method `post_process_merk_proof` is never used:
grovedb/src/operations/proof/generate.rs#L530
warning: method `post_process_merk_proof` is never used
--> grovedb/src/operations/proof/generate.rs:530:8
|
182 | impl GroveDb {
| ------------ method in this implementation
...
530 | fn post_process_merk_proof<B: AsRef<[u8]>>(
| ^^^^^^^^^^^^^^^^^^^^^^^
|
variants `Execute`, `AverageCase`, and `WorstCase` are never constructed:
grovedb/src/batch/mode.rs#L46
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
|
method `get_batch_run_mode` is never used:
grovedb/src/batch/mod.rs#L686
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
|
type `query::InternalCowItemsQuery<'a>` is more private than the item `query::PathQuery::query_items_at_path`:
grovedb/src/query/mod.rs#L288
warning: type `query::InternalCowItemsQuery<'a>` is more private than the item `query::PathQuery::query_items_at_path`
--> grovedb/src/query/mod.rs:288:5
|
288 | pub fn query_items_at_path<'a>(&'a self, path: &[&[u8]]) -> Option<InternalCowItemsQuery> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method `query::PathQuery::query_items_at_path` is reachable at visibility `pub`
|
note: but type `query::InternalCowItemsQuery<'a>` is only usable at visibility `pub(crate)`
--> grovedb/src/query/mod.rs:410:1
|
410 | pub(crate) struct InternalCowItemsQuery<'a> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: `#[warn(private_interfaces)]` on by default
|
this `if` statement can be collapsed:
grovedb/src/query/mod.rs#L304
warning: this `if` statement can be collapsed
--> grovedb/src/query/mod.rs:304:29
|
304 | / ... if path_after_top_removed.len() <= subquery_path.len() {
305 | | ... if path_after_top_removed
306 | | ... .iter()
307 | | ... .zip(subquery_path)
... |
323 | | ... }
324 | | ... }
| |_______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
= note: `#[warn(clippy::collapsible_if)]` on by default
help: collapse nested if block
|
304 ~ if path_after_top_removed.len() <= subquery_path.len() && path_after_top_removed
305 + .iter()
306 + .zip(subquery_path)
307 + .all(|(a, b)| *a == b.as_slice()) {
308 + return if path_after_top_removed.len() == subquery_path.len() {
309 + if let Some(subquery) = &subquery_branch.subquery {
310 + Some(InternalCowItemsQuery::from_query(subquery))
311 + } else {
312 + None
313 + }
314 + } else {
315 + Some(InternalCowItemsQuery::from_items_when_in_path(
316 + Cow::Owned(vec![QueryItem::Key(
317 + subquery_path[path_after_top_removed.len()].clone(),
318 + )]),
319 + ))
320 + };
321 + }
|
|
unused import: `net::Ipv4Addr`:
grovedb/src/debugger.rs#L3
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
|
duplicated attribute:
merk/src/estimated_costs/average_case_costs.rs#L77
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
|
this function has too many arguments (8/7):
merk/src/tree/mod.rs#L783
warning: this function has too many arguments (8/7)
--> merk/src/tree/mod.rs:783:5
|
783 | / pub fn put_value_with_reference_value_hash_and_value_cost(
784 | | mut self,
785 | | value: Vec<u8>,
786 | | value_hash: CryptoHash,
... |
805 | | >,
806 | | ) -> 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#L316
warning: this function has too many arguments (8/7)
--> merk/src/tree/walk/mod.rs:316:5
|
316 | / pub fn put_value_with_reference_value_hash_and_value_cost(
317 | | mut self,
318 | | value: Vec<u8>,
319 | | value_hash: CryptoHash,
... |
338 | | >,
339 | | ) -> 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#L690
warning: this function has too many arguments (9/7)
--> merk/src/tree/ops.rs:690:5
|
690 | / fn recurse<K: AsRef<[u8]>, C, V, U, R>(
691 | | self,
692 | | batch: &MerkBatch<K>,
693 | | mid: usize,
... |
699 | | section_removal_bytes: &mut R,
700 | | ) -> CostResult<(Option<Self>, KeyUpdates), Error>
| |______________________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
|
the borrowed expression implements the required traits:
merk/src/proofs/mod.rs#L131
warning: the borrowed expression implements the required traits
--> merk/src/proofs/mod.rs:131:78
|
131 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
merk/src/proofs/mod.rs#L129
warning: the borrowed expression implements the required traits
--> merk/src/proofs/mod.rs:129:21
|
129 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
merk/src/proofs/query/query_item/mod.rs#L85
warning: the borrowed expression implements the required traits
--> merk/src/proofs/query/query_item/mod.rs:85:78
|
85 | String::from_utf8(hex_value.to_vec()).unwrap_or_else(|_| hex::encode(&hex_value))
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args
|
the borrowed expression implements the required traits:
merk/src/proofs/query/query_item/mod.rs#L83
warning: the borrowed expression implements the required traits
--> merk/src/proofs/query/query_item/mod.rs:83:21
|
83 | hex::encode(&hex_value)
| ^^^^^^^^^^ help: change this to: `hex_value`
|
= 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
|
assigning the result of `Clone::clone()` may be inefficient:
merk/src/proofs/query/merge.rs#L385
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
|
assigning the result of `Clone::clone()` may be inefficient:
merk/src/proofs/query/merge.rs#L336
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
|
assigning the result of `Clone::clone()` may be inefficient:
merk/src/proofs/query/merge.rs#L253
warning: assigning the result of `Clone::clone()` may be inefficient
--> merk/src/proofs/query/merge.rs:253:13
|
253 | self.default_subquery_branch.subquery = other_default_branch_subquery.clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `self.default_subquery_branch.subquery.clone_from(&other_default_branch_subquery)`
|
= 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
|
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
|
very complex type used. Consider factoring parts into `type` definitions:
merk/src/merk/mod.rs#L578
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/mod.rs:578:10
|
578 | ) -> (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 (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
|
very complex type used. Consider factoring parts into `type` definitions:
merk/src/merk/chunks.rs#L346
warning: very complex type used. Consider factoring parts into `type` definitions
--> merk/src/merk/chunks.rs:346:33
|
346 | fn next_chunk(&mut self) -> 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
|
trait `BTreeMapExtras` is never used:
merk/src/proofs/query/map.rs#L377
warning: trait `BTreeMapExtras` is never used
--> merk/src/proofs/query/map.rs:377:7
|
377 | trait BTreeMapExtras {
| ^^^^^^^^^^^^^^
|
method `attempt_state_recovery` is never used:
merk/src/merk/restore.rs#L390
warning: method `attempt_state_recovery` is never used
--> merk/src/merk/restore.rs:390:8
|
66 | impl<'db, S: StorageContext<'db>> Restorer<S> {
| --------------------------------------------- method in this implementation
...
390 | fn attempt_state_recovery(&mut self) -> Result<(), Error> {
| ^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
'test' may be misspelled as 'tests':
merk/src/tree/fuzz_tests.rs#L3
warning: 'test' may be misspelled as 'tests'
--> merk/src/tree/fuzz_tests.rs:3:8
|
3 | #![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
|
Linting
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Linting
The following actions uses Node.js version which is deprecated and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Linting
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Compilation errors
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Compilation errors
The following actions uses Node.js version which is deprecated and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Compilation errors
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests
The following actions uses node12 which is deprecated and will be forced to run on node16: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Tests
The following actions uses Node.js version which is deprecated and will be forced to run on node20: styfle/[email protected], actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
Tests
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|