Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Commit

Permalink
chore: silence wasm warnings (#1404)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jun 22, 2022
1 parent 1ce2310 commit 40c304d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

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

3 changes: 3 additions & 0 deletions ethers-providers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ hashers = "1.0.1"
tokio = { version = "1.18", features = ["time"] }
tokio-tungstenite = { version = "0.17.1", default-features = false, features = ["connect"], optional = true }


[target.'cfg(target_arch = "wasm32")'.dependencies]
ws_stream_wasm = "0.7"
wasm-bindgen = "0.2"
Expand All @@ -55,6 +56,8 @@ web-sys = { version = "0.3", features = ["console"] }
wasm-timer = "0.2"
# this is currently necessary for `wasm-timer::Delay` to work
parking_lot = { version = "0.11", features = ["wasm-bindgen"] }
# NOTE: this enables wasm compatibility for getrandom indirectly
getrandom = { version = "0.2", features = ["js"] }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.18", default-features = false, features = ["rt", "macros", "time"] }
Expand Down
1 change: 1 addition & 0 deletions ethers-providers/src/pending_escalator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ where
{
type Output = Result<TransactionReceipt, ProviderError>;

#[cfg_attr(target_arch = "wasm32", allow(unused_must_use))]
fn poll(
self: std::pin::Pin<&mut Self>,
cx: &mut std::task::Context<'_>,
Expand Down
1 change: 1 addition & 0 deletions ethers-providers/src/pending_transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ macro_rules! rewake_with_new_state_if {
impl<'a, P: JsonRpcClient> Future for PendingTransaction<'a, P> {
type Output = Result<Option<TransactionReceipt>, ProviderError>;

#[cfg_attr(target_arch = "wasm32", allow(unused_must_use))]
fn poll(self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Self::Output> {
let this = self.project();

Expand Down

0 comments on commit 40c304d

Please sign in to comment.