Skip to content

Merge remote-tracking branch 'refs/remotes/origin/main' #120

Merge remote-tracking branch 'refs/remotes/origin/main'

Merge remote-tracking branch 'refs/remotes/origin/main' #120

Triggered via push November 18, 2023 18:07
Status Success
Total duration 8m 34s
Artifacts
This run and associated checks have been archived and are scheduled for deletion. Learn more about checks retention
Fit to window
Zoom out
Zoom in

Annotations

24 warnings
this expression creates a reference which is immediately dereferenced by the compiler: src/lazy_merkle_tree.rs#L1152
warning: this expression creates a reference which is immediately dereferenced by the compiler --> src/lazy_merkle_tree.rs:1152:27 | 1152 | if file.write_all(&buf).is_err() { | ^^^^ help: change this to: `buf` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow = note: `#[warn(clippy::needless_borrow)]` implied by `#[warn(clippy::all)]`
temporary with significant `Drop` can be early dropped: src/lazy_merkle_tree.rs#L984
warning: temporary with significant `Drop` can be early dropped --> src/lazy_merkle_tree.rs:984:17 | 983 | fn update_with_mutation(&self, index: usize, value: &H::Hash) { | ___________________________________________________________________- 984 | | let mut storage = self.storage.lock().expect("lock poisoned, terminating"); | | ^^^^^^^ 985 | | let leaf_index_in_dense_tree = index + (self.root_index << self.depth); 986 | | storage[leaf_index_in_dense_tree] = value.clone(); ... | 993 | | } 994 | | } | |_____- temporary `storage` is currently being dropped at the end of its contained scope | = note: this might lead to unnecessary resource contention = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_tightening help: merge the temporary construction with its single usage | 984 ~ 985 + self.storage.lock().expect("lock poisoned, terminating").; | help: remove separated single usage | 986 - storage[leaf_index_in_dense_tree] = value.clone(); 986 + |
temporary with significant `Drop` can be early dropped: src/lazy_merkle_tree.rs#L747
warning: temporary with significant `Drop` can be early dropped --> src/lazy_merkle_tree.rs:747:17 | 746 | fn update_with_mutation(&self, index: usize, value: &H::Hash) { | ___________________________________________________________________- 747 | | let mut storage = self.storage.lock().expect("lock poisoned, terminating"); | | ^^^^^^^ 748 | | let leaf_index_in_dense_tree = index + (self.root_index << self.depth); 749 | | storage[leaf_index_in_dense_tree] = value.clone(); ... | 756 | | } 757 | | } | |_____- temporary `storage` is currently being dropped at the end of its contained scope | = note: this might lead to unnecessary resource contention = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#significant_drop_tightening note: the lint level is defined here --> src/lib.rs:2:55 | 2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo, clippy::nursery)] | ^^^^^^^^^^^^^^^ = note: `#[warn(clippy::significant_drop_tightening)]` implied by `#[warn(clippy::nursery)]` help: merge the temporary construction with its single usage | 747 ~ 748 + self.storage.lock().expect("lock poisoned, terminating").; | help: remove separated single usage | 749 - storage[leaf_index_in_dense_tree] = value.clone(); 749 + |
redundant clone: src/lazy_merkle_tree.rs#L563
warning: redundant clone --> src/lazy_merkle_tree.rs:563:39 | 563 | let right = children.right.clone(); | ^^^^^^^^ help: remove this | note: cloned value is neither consumed nor mutated --> src/lazy_merkle_tree.rs:563:25 | 563 | let right = children.right.clone(); | ^^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone
redundant clone: src/lazy_merkle_tree.rs#L562
warning: redundant clone --> src/lazy_merkle_tree.rs:562:37 | 562 | let left = children.left.clone(); | ^^^^^^^^ help: remove this | note: cloned value is neither consumed nor mutated --> src/lazy_merkle_tree.rs:562:24 | 562 | let left = children.left.clone(); | ^^^^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_clone = note: `#[warn(clippy::redundant_clone)]` implied by `#[warn(clippy::all)]`
docs for function returning `Result` missing `# Errors` section: src/lazy_merkle_tree.rs#L86
warning: docs for function returning `Result` missing `# Errors` section --> src/lazy_merkle_tree.rs:86:5 | 86 | / pub fn new_mmapped_with_dense_prefix_with_init_values( 87 | | depth: usize, 88 | | prefix_depth: usize, 89 | | empty_value: &H::Hash, 90 | | initial_values: &[H::Hash], 91 | | file_path: &str, 92 | | ) -> Result<LazyMerkleTree<H, Canonical>, DenseMMapError> { | |_____________________________________________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]`: src/lazy_merkle_tree.rs#L86
warning: this function has an empty `#[must_use]` attribute, but returns a type already marked as `#[must_use]` --> src/lazy_merkle_tree.rs:86:5 | 86 | / pub fn new_mmapped_with_dense_prefix_with_init_values( 87 | | depth: usize, 88 | | prefix_depth: usize, 89 | | empty_value: &H::Hash, 90 | | initial_values: &[H::Hash], 91 | | file_path: &str, 92 | | ) -> Result<LazyMerkleTree<H, Canonical>, DenseMMapError> { | |_____________________________________________________________^ | = help: either add some descriptive text or remove the attribute = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#double_must_use = note: `#[warn(clippy::double_must_use)]` implied by `#[warn(clippy::all)]`
unneeded `return` statement: src/protocol/authentication.rs#L31
warning: unneeded `return` statement --> src/protocol/authentication.rs:31:5 | 31 | / return super::verify_proof( 32 | | root, 33 | | nullifier_hash, 34 | | signal_hash, ... | 37 | | depth, 38 | | ); | |_____^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return = help: remove `return`
docs for function returning `Result` missing `# Errors` section: src/protocol/authentication.rs#L20
warning: docs for function returning `Result` missing `# Errors` section --> src/protocol/authentication.rs:20:1 | 20 | / pub fn verify_proof( 21 | | depth: usize, 22 | | id_commitment: Field, 23 | | nullifier_hash: Field, ... | 26 | | proof: &Proof, 27 | | ) -> Result<bool, ProofError> { | |_____________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc
unneeded `return` statement: src/protocol/authentication.rs#L17
warning: unneeded `return` statement --> src/protocol/authentication.rs:17:5 | 17 | return super::generate_proof(identity, &merkle_proof, ext_nullifier_hash, signal_hash); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return note: the lint level is defined here --> src/lib.rs:2:9 | 2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo, clippy::nursery)] | ^^^^^^^^^^^ = note: `#[warn(clippy::needless_return)]` implied by `#[warn(clippy::all)]` = help: remove `return`
docs for function returning `Result` missing `# Errors` section: src/protocol/authentication.rs#L8
warning: docs for function returning `Result` missing `# Errors` section --> src/protocol/authentication.rs:8:1 | 8 | / pub fn generate_proof( 9 | | depth: usize, 10 | | identity: &Identity, 11 | | ext_nullifier_hash: Field, 12 | | signal_hash: Field, 13 | | ) -> Result<Proof, ProofError> { | |______________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_errors_doc note: the lint level is defined here --> src/lib.rs:2:22 | 2 | #![warn(clippy::all, clippy::pedantic, clippy::cargo, clippy::nursery)] | ^^^^^^^^^^^^^^^^ = note: `#[warn(clippy::missing_errors_doc)]` implied by `#[warn(clippy::pedantic)]`
unused import: `std::time::Instant`: src/protocol/mod.rs#L21
warning: unused import: `std::time::Instant` --> src/protocol/mod.rs:21:5 | 21 | use std::time::Instant; | ^^^^^^^^^^^^^^^^^^ | = note: `#[warn(unused_imports)]` on by default
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
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/protocol/mod.rs#L21
unused import: `std::time::Instant`
Test
`semaphore` (lib) generated 1 warning (run `cargo fix --lib -p semaphore` to apply 1 suggestion)