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:
Eitan Seri-Levi
2023-10-31 10:31:02 +00:00
parent a9f9dc241d
commit 4ce01ddd11
35 changed files with 185 additions and 286 deletions

View File

@@ -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();