mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-03 00:31:50 +00:00
Activate clippy::manual_let_else lint (#4889)
## Issue Addressed #4888 ## Proposed Changes Enabled `clippy::manual_let_else` lint and resolved the warning messages.
This commit is contained in:
@@ -51,13 +51,10 @@ impl<E: EthSpec> Case for MerkleProofValidity<E> {
|
||||
fn result(&self, _case_index: usize, _fork_name: ForkName) -> Result<(), Error> {
|
||||
let mut state = self.state.clone();
|
||||
state.initialize_tree_hash_cache();
|
||||
let proof = match state.compute_merkle_proof(self.merkle_proof.leaf_index) {
|
||||
Ok(proof) => proof,
|
||||
Err(_) => {
|
||||
return Err(Error::FailedToParseTest(
|
||||
"Could not retrieve merkle proof".to_string(),
|
||||
))
|
||||
}
|
||||
let Ok(proof) = state.compute_merkle_proof(self.merkle_proof.leaf_index) else {
|
||||
return Err(Error::FailedToParseTest(
|
||||
"Could not retrieve merkle proof".to_string(),
|
||||
));
|
||||
};
|
||||
let proof_len = proof.len();
|
||||
let branch_len = self.merkle_proof.branch.len();
|
||||
|
||||
Reference in New Issue
Block a user