chore: silence wasm warnings (#1404)
This commit is contained in:
parent
1ce2310874
commit
40c304d939
|
@ -1342,6 +1342,7 @@ dependencies = [
|
||||||
"futures-core",
|
"futures-core",
|
||||||
"futures-timer",
|
"futures-timer",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
|
"getrandom 0.2.7",
|
||||||
"hashers",
|
"hashers",
|
||||||
"hex",
|
"hex",
|
||||||
"http",
|
"http",
|
||||||
|
|
|
@ -47,6 +47,7 @@ hashers = "1.0.1"
|
||||||
tokio = { version = "1.18", features = ["time"] }
|
tokio = { version = "1.18", features = ["time"] }
|
||||||
tokio-tungstenite = { version = "0.17.1", default-features = false, features = ["connect"], optional = true }
|
tokio-tungstenite = { version = "0.17.1", default-features = false, features = ["connect"], optional = true }
|
||||||
|
|
||||||
|
|
||||||
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
||||||
ws_stream_wasm = "0.7"
|
ws_stream_wasm = "0.7"
|
||||||
wasm-bindgen = "0.2"
|
wasm-bindgen = "0.2"
|
||||||
|
@ -55,6 +56,8 @@ web-sys = { version = "0.3", features = ["console"] }
|
||||||
wasm-timer = "0.2"
|
wasm-timer = "0.2"
|
||||||
# this is currently necessary for `wasm-timer::Delay` to work
|
# this is currently necessary for `wasm-timer::Delay` to work
|
||||||
parking_lot = { version = "0.11", features = ["wasm-bindgen"] }
|
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]
|
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
|
||||||
tokio = { version = "1.18", default-features = false, features = ["rt", "macros", "time"] }
|
tokio = { version = "1.18", default-features = false, features = ["rt", "macros", "time"] }
|
||||||
|
|
|
@ -175,6 +175,7 @@ where
|
||||||
{
|
{
|
||||||
type Output = Result<TransactionReceipt, ProviderError>;
|
type Output = Result<TransactionReceipt, ProviderError>;
|
||||||
|
|
||||||
|
#[cfg_attr(target_arch = "wasm32", allow(unused_must_use))]
|
||||||
fn poll(
|
fn poll(
|
||||||
self: std::pin::Pin<&mut Self>,
|
self: std::pin::Pin<&mut Self>,
|
||||||
cx: &mut std::task::Context<'_>,
|
cx: &mut std::task::Context<'_>,
|
||||||
|
|
|
@ -167,6 +167,7 @@ macro_rules! rewake_with_new_state_if {
|
||||||
impl<'a, P: JsonRpcClient> Future for PendingTransaction<'a, P> {
|
impl<'a, P: JsonRpcClient> Future for PendingTransaction<'a, P> {
|
||||||
type Output = Result<Option<TransactionReceipt>, ProviderError>;
|
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> {
|
fn poll(self: Pin<&mut Self>, ctx: &mut Context) -> Poll<Self::Output> {
|
||||||
let this = self.project();
|
let this = self.project();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue