Skip to content

Commit

Permalink
fix: add cfg to IntoFuture preventing Send (#2086)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Jan 30, 2023
1 parent 9ebc5b3 commit 60e1779
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ethers-contract/src/call.rs
Expand Up @@ -228,6 +228,11 @@ where
D: Detokenize + Send + Sync,
{
type Output = Result<D, ContractError<M>>;

#[cfg(target_arch = "wasm32")]
type IntoFuture = Pin<Box<dyn Future<Output = Self::Output>>>;

#[cfg(not(target_arch = "wasm32"))]
type IntoFuture = Pin<Box<dyn Future<Output = Self::Output> + Send>>;

fn into_future(self) -> Self::IntoFuture {
Expand Down

0 comments on commit 60e1779

Please sign in to comment.