From f1c3f5d8e1919be8c0c07bdf474373a72f79d750 Mon Sep 17 00:00:00 2001 From: dancoombs Date: Fri, 6 Oct 2023 15:01:40 -0400 Subject: [PATCH] fix: rust 1.73.0 fixes --- Cargo.toml | 1 + crates/pool/src/chain.rs | 3 +-- crates/sim/src/estimation/estimation.rs | 1 - 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e13584830..8eb8123e7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ members = [ "crates/*", ] default-members = ["bin/rundler"] +resolver = "2" [workspace.package] version = "0.1.0-beta" diff --git a/crates/pool/src/chain.rs b/crates/pool/src/chain.rs index 7e2f4a34f..8b95f0c70 100644 --- a/crates/pool/src/chain.rs +++ b/crates/pool/src/chain.rs @@ -508,8 +508,7 @@ mod tests { fn get_block_by_hash(&self, hash: H256) -> Option> { let blocks = self.blocks.read(); - let number = blocks.iter().position(|block| block.hash == hash); - let Some(number) = number else { return None }; + let number = blocks.iter().position(|block| block.hash == hash)?; let parent_hash = if number > 0 { blocks[number - 1].hash } else { diff --git a/crates/sim/src/estimation/estimation.rs b/crates/sim/src/estimation/estimation.rs index 2c96fb3ad..f095057a0 100644 --- a/crates/sim/src/estimation/estimation.rs +++ b/crates/sim/src/estimation/estimation.rs @@ -256,7 +256,6 @@ impl GasEstimatorImpl { guess = (max_failure_gas + min_success_gas) / 2; } - let mut min_success_gas = min_success_gas; if op.paymaster().is_none() { // If not using a paymaster, add the gas for the gas fee transfer. min_success_gas += GAS_FEE_TRANSFER_COST;