Skip to content

Commit a4437f9

Browse files
remove dead code
1 parent 1c63ae0 commit a4437f9

File tree

1 file changed

+4
-30
lines changed

1 file changed

+4
-30
lines changed

iroh-relay/src/client.rs

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ pub enum ConnectError {
6161
NoLocalAddr,
6262
#[error("tls connection failed")]
6363
Tls(#[source] std::io::Error),
64+
#[cfg(wasm_browser)]
65+
#[error("The relay protocol is not available in browsers")]
66+
RelayProtoNotAvailable,
6467
}
6568

6669
/// Dialing errors
@@ -90,35 +93,6 @@ pub enum DialError {
9093
ProxyInvalidTargetPort,
9194
}
9295

93-
/// Client related errors
94-
#[allow(missing_docs)]
95-
#[derive(Debug, thiserror::Error)]
96-
#[non_exhaustive]
97-
pub enum Error {
98-
#[cfg(not(wasm_browser))]
99-
#[error(transparent)]
100-
Dns(#[from] DnsError),
101-
#[error(transparent)]
102-
Hyper(#[from] hyper::Error),
103-
#[error(transparent)]
104-
InvalidDnsName(#[from] rustls::pki_types::InvalidDnsNameError),
105-
#[error(transparent)]
106-
ProtoRelay(#[from] crate::protos::relay::Error),
107-
#[error(transparent)]
108-
Io(#[from] std::io::Error),
109-
#[error("Timeout")]
110-
Timeout(#[from] time::Elapsed),
111-
#[error(transparent)]
112-
Http(#[from] hyper::http::Error),
113-
#[error(transparent)]
114-
Utf8(#[from] std::str::Utf8Error),
115-
#[cfg(wasm_browser)]
116-
#[error("The relay protocol is not available in browsers")]
117-
RelayProtoNotAvailable,
118-
#[error(transparent)]
119-
Websocket(#[from] tokio_tungstenite_wasm::Error),
120-
}
121-
12296
/// Build a Client.
12397
#[derive(derive_more::Debug, Clone)]
12498
pub struct ClientBuilder {
@@ -233,7 +207,7 @@ impl ClientBuilder {
233207
(conn, Some(local_addr))
234208
}
235209
#[cfg(wasm_browser)]
236-
Protocol::Relay => return Err(Error::RelayProtoNotAvailable),
210+
Protocol::Relay => return Err(ConnectError::RelayProtoNotAvailable),
237211
};
238212

239213
event!(

0 commit comments

Comments
 (0)