Merge pull request #53 from worldcoin/0xkitsune/pod #148
clippy
29 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 29 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0-nightly (b11fbfbf3 2024-02-03)
- cargo 1.78.0-nightly (7bb7b5395 2024-01-20)
- clippy 0.1.77 (b11fbfb 2024-02-03)
Annotations
Check warning on line 1078 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:1078:41
|
1078 | 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
Check warning on line 1041 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:1041:9
|
1041 | 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
Check warning on line 1012 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:1012:9
|
1012 | 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
Check warning on line 1001 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:1001:45
|
1001 | 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
Check warning on line 980 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:980:13
|
980 | 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
Check warning on line 851 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:851:41
|
851 | 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
Check warning on line 814 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:814:9
|
814 | 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
Check warning on line 785 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:785:9
|
785 | 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
Check warning on line 774 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:774:45
|
774 | 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
Check warning on line 753 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:753:13
|
753 | 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
Check warning on line 700 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:700:34
|
700 | let empties = repeat(empty_value.clone()).take(leaf_count - values.len());
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 696 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:696:30
|
696 | let empties = repeat(empty_value.clone()).take(leaf_count);
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 660 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:660:16
|
660 | || self.root.clone(),
| ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.root`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 655 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:655:9
|
655 | self.root.clone()
| ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.root`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 629 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:629:35
|
629 | return Self::new_leaf(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
Check warning on line 583 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:583:23
|
583 | root: self.root.clone(),
| ^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.root`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 519 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:519:9
|
519 | self.empty_tree_values[0].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.empty_tree_values[0]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 515 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:515:9
|
515 | self.empty_tree_values[self.depth].clone()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.empty_tree_values[self.depth]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 460 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:460:23
|
460 | let val = self.empty_tree_values[depth - 1].clone();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.empty_tree_values[depth - 1]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 313 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:313:47
|
313 | EmptyTree::new(current_depth, empty_leaf.clone()).into(),
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_leaf`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 291 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:291:47
|
291 | EmptyTree::new(current_depth, empty_value.clone()).into(),
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 268 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:268:47
|
268 | EmptyTree::new(current_depth, empty_value.clone()).into(),
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 261 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:261:61
|
261 | let mut result: Self = EmptyTree::new(prefix_depth, empty_value.clone())
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 251 in src/lazy_merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/lazy_merkle_tree.rs:251:47
|
251 | EmptyTree::new(current_depth, empty_value.clone()).into(),
| ^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*empty_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
Check warning on line 154 in src/merkle_tree.rs
github-actions / clippy
using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
warning: using `clone` on type `<H as Hasher>::Hash` which implements the `Copy` trait
--> src/merkle_tree.rs:154:36
|
154 | 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