Skip to content

Commit

Permalink
fixup wasm imports
Browse files Browse the repository at this point in the history
  • Loading branch information
dignifiedquire committed Feb 3, 2025
1 parent 64bd73f commit 96176a3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions iroh-relay/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ use std::{
};

use conn::Conn;
#[cfg(not(wasm_browser))]
use connect_relay::DnsError;
#[cfg(not(wasm_browser))]
use hickory_resolver::TokioResolver as DnsResolver;
use iroh_base::{RelayUrl, SecretKey};
use n0_future::{
split::{split, SplitSink, SplitStream},
Sink, Stream,
time, Sink, Stream,
};
#[cfg(any(test, feature = "test-utils"))]
use tracing::warn;
Expand Down Expand Up @@ -52,6 +53,7 @@ pub enum Error {
InvalidWebsocketUrl(Url),
#[error(transparent)]
Websocket(#[from] tokio_tungstenite_wasm::Error),
#[cfg(not(wasm_browser))]
#[error(transparent)]
Dns(#[from] DnsError),
#[error(transparent)]
Expand All @@ -67,7 +69,7 @@ pub enum Error {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("Timeout")]
Timeout(#[from] tokio::time::error::Elapsed),
Timeout(#[from] time::Elapsed),
#[error(transparent)]
Http(#[from] hyper::http::Error),
#[error("Unexpected frame received {0}")]
Expand Down
4 changes: 2 additions & 2 deletions iroh-relay/src/protos/relay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use bytes::{BufMut, Bytes};
use iroh_base::{PublicKey, SecretKey, Signature, SignatureError};
#[cfg(feature = "server")]
use n0_future::time::Duration;
use n0_future::{Sink, SinkExt};
use n0_future::{time, Sink, SinkExt};
#[cfg(any(test, feature = "server"))]
use n0_future::{Stream, StreamExt};
use postcard::experimental::max_size::MaxSize;
Expand Down Expand Up @@ -137,7 +137,7 @@ pub enum Error {
#[error(transparent)]
SerDe(#[from] postcard::Error),
#[error("timeout")]
Timeout(#[from] tokio::time::error::Elapsed),
Timeout(#[from] time::Elapsed),
#[error(transparent)]
InvalidSignature(#[from] SignatureError),
#[error(transparent)]
Expand Down

0 comments on commit 96176a3

Please sign in to comment.