assert #167
Annotations
1 error and 25 warnings
Test
The process '/home/runner/.cargo/bin/cargo' failed with exit code 101
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/merkle_tree.rs#L165
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/merkle_tree.rs:165:36
|
165 | 0 => Branch::Right(self.nodes[index - 1].clone()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nodes[index - 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/merkle_tree.rs#L164
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/merkle_tree.rs:164:35
|
164 | 1 => Branch::Left(self.nodes[index + 1].clone()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.nodes[index + 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L1063
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:1063:41
|
1063 | return SparseTree::new_leaf(hash.clone());
| ^^^^^^^^^^^^ help: try dereferencing it: `*hash`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L1026
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:1026:9
|
1026 | self.storage[self.root_index].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.storage[self.root_index]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L997
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:997:9
|
997 | self.storage.lock().expect("lock poisoned")[self.root_index].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.storage.lock().expect("lock poisoned")[self.root_index]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L986
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:986:45
|
986 | storage[leaf_index_in_dense_tree] = value.clone();
| ^^^^^^^^^^^^^ help: try dereferencing it: `*value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L965
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:965:13
|
965 | r.storage[leaf_index_in_dense_tree].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `r.storage[leaf_index_in_dense_tree]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L836
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:836:41
|
836 | return SparseTree::new_leaf(hash.clone());
| ^^^^^^^^^^^^ help: try dereferencing it: `*hash`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L799
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:799:9
|
799 | self.storage[self.root_index].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.storage[self.root_index]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
|
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait:
src/lazy_merkle_tree.rs#L770
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:770:9
|
770 | self.storage.lock().unwrap()[self.root_index].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.storage.lock().unwrap()[self.root_index]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
note: the lint level is defined here
--> src/lib.rs:2:9
|
2 | #![warn(clippy::all, clippy::cargo)]
| ^^^^^^^^^^^
= note: `#[warn(clippy::clone_on_copy)]` implied by `#[warn(clippy::all)]`
|
function `as_bytes` is never used:
src/util.rs#L24
warning: function `as_bytes` is never used
--> src/util.rs:24:22
|
24 | pub(crate) unsafe fn as_bytes<T: ?Sized>(p: &T) -> &[u8] {
| ^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
Lint
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1, actions-rs/clippy-check@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@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/
|
Lint
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/
|
Lint
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/
|
Lint
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/
|
Lint
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/
|
Test
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Test
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
Test
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/
|
Test
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/
|
Test
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/
|
Test
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/
|
Test:
src/util.rs#L24
function `as_bytes` is never used
|
Test
`semaphore` (lib) generated 1 warning
|