Skip to content

Commit

Permalink
chore(deps): remove async_recursion (#9500)
Browse files Browse the repository at this point in the history
Native async recursion was stabilized in 1.77.
  • Loading branch information
DaniPopes authored Dec 5, 2024
1 parent 92cd165 commit e520767
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion crates/script/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
semver.workspace = true
futures.workspace = true
tokio.workspace = true
async-recursion = "1.1"

itertools.workspace = true
parking_lot.workspace = true
Expand Down
4 changes: 1 addition & 3 deletions crates/script/src/execute.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ use alloy_primitives::{
};
use alloy_provider::Provider;
use alloy_rpc_types::TransactionInput;
use async_recursion::async_recursion;
use eyre::{OptionExt, Result};
use foundry_cheatcodes::Wallets;
use foundry_cli::utils::{ensure_clean_constructor, needs_setup};
Expand Down Expand Up @@ -101,7 +100,6 @@ pub struct PreExecutionState {
impl PreExecutionState {
/// Executes the script and returns the state after execution.
/// Might require executing script twice in cases when we determine sender from execution.
#[async_recursion]
pub async fn execute(mut self) -> Result<ExecutedState> {
let mut runner = self
.script_config
Expand All @@ -127,7 +125,7 @@ impl PreExecutionState {
build_data: self.build_data.build_data,
};

return state.link().await?.prepare_execution().await?.execute().await;
return Box::pin(state.link().await?.prepare_execution().await?.execute()).await;
}

Ok(ExecutedState {
Expand Down

0 comments on commit e520767

Please sign in to comment.