Rust 1.84 lints (#6781)

* Fix few lints

* Fix remaining lints

* Use fully qualified syntax
This commit is contained in:
Pawan Dhananjay
2025-01-10 06:43:29 +05:30
committed by GitHub
parent 87b72dec21
commit 1f6850fae2
61 changed files with 110 additions and 138 deletions

View File

@@ -223,7 +223,7 @@ pub fn run<E: EthSpec>(
.update_tree_hash_cache()
.map_err(|e| format!("Unable to build THC: {:?}", e))?;
if state_root_opt.map_or(false, |expected| expected != state_root) {
if state_root_opt.is_some_and(|expected| expected != state_root) {
return Err(format!(
"State root mismatch! Expected {}, computed {}",
state_root_opt.unwrap(),
@@ -331,7 +331,7 @@ fn do_transition<E: EthSpec>(
.map_err(|e| format!("Unable to build tree hash cache: {:?}", e))?;
debug!("Initial tree hash: {:?}", t.elapsed());
if state_root_opt.map_or(false, |expected| expected != state_root) {
if state_root_opt.is_some_and(|expected| expected != state_root) {
return Err(format!(
"State root mismatch! Expected {}, computed {}",
state_root_opt.unwrap(),