Skip to content

Commit 08b7c94

Browse files
authored
chore: bump to MSRV 1.88 (#10921)
* chore: bump to MSRV 1.88 * clippy --fix * cargo fmt
1 parent 488b962 commit 08b7c94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

89 files changed

+1332
-1431
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ resolver = "2"
3131
version = "1.2.3"
3232
edition = "2024"
3333
# Remember to update clippy.toml as well
34-
rust-version = "1.87"
34+
rust-version = "1.88"
3535
authors = ["Foundry Contributors"]
3636
license = "MIT OR Apache-2.0"
3737
homepage = "https://github.com/foundry-rs/foundry"

clippy.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
msrv = "1.87"
1+
msrv = "1.88"
22

33
# `bytes::Bytes` is included by default and `alloy_primitives::Bytes` is a wrapper around it,
44
# so it is safe to ignore it as well.

crates/anvil/src/cmd.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -606,12 +606,11 @@ pub struct AnvilEvmArgs {
606606
/// Does nothing if the fork-url is not a configured alias.
607607
impl AnvilEvmArgs {
608608
pub fn resolve_rpc_alias(&mut self) {
609-
if let Some(fork_url) = &self.fork_url {
610-
if let Ok(config) = Config::load_with_providers(FigmentProviders::Anvil) {
611-
if let Some(Ok(url)) = config.get_rpc_url_with_alias(&fork_url.url) {
612-
self.fork_url = Some(ForkUrl { url: url.to_string(), block: fork_url.block });
613-
}
614-
}
609+
if let Some(fork_url) = &self.fork_url
610+
&& let Ok(config) = Config::load_with_providers(FigmentProviders::Anvil)
611+
&& let Some(Ok(url)) = config.get_rpc_url_with_alias(&fork_url.url)
612+
{
613+
self.fork_url = Some(ForkUrl { url: url.to_string(), block: fork_url.block });
615614
}
616615
}
617616
}

crates/anvil/src/config.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,11 +1280,11 @@ latest block number: {latest_block}"
12801280
}
12811281

12821282
// use remote gas price
1283-
if self.gas_price.is_none() {
1284-
if let Ok(gas_price) = provider.get_gas_price().await {
1285-
self.gas_price = Some(gas_price);
1286-
fees.set_gas_price(gas_price);
1287-
}
1283+
if self.gas_price.is_none()
1284+
&& let Ok(gas_price) = provider.get_gas_price().await
1285+
{
1286+
self.gas_price = Some(gas_price);
1287+
fees.set_gas_price(gas_price);
12881288
}
12891289

12901290
let block_hash = block.header.hash;
@@ -1592,10 +1592,10 @@ async fn find_latest_fork_block<P: Provider<AnyNetwork>>(
15921592
// walk back from the head of the chain, but at most 2 blocks, which should be more than enough
15931593
// leeway
15941594
for _ in 0..2 {
1595-
if let Some(block) = provider.get_block(num.into()).await? {
1596-
if !block.header.hash.is_zero() {
1597-
break;
1598-
}
1595+
if let Some(block) = provider.get_block(num.into()).await?
1596+
&& !block.header.hash.is_zero()
1597+
{
1598+
break;
15991599
}
16001600
// block not actually finalized, so we try the block before
16011601
num = num.saturating_sub(1)

0 commit comments

Comments
 (0)