From f6f44784fff5488bb59d563ee7ff7b94c08a48c1 Mon Sep 17 00:00:00 2001 From: hozan23 Date: Sun, 19 May 2024 23:41:31 +0200 Subject: use cargo features to enable/disable protocols for net crate --- net/src/error.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net/src/error.rs') diff --git a/net/src/error.rs b/net/src/error.rs index ee93168..102a343 100644 --- a/net/src/error.rs +++ b/net/src/error.rs @@ -37,6 +37,7 @@ pub enum Error { #[error(transparent)] ChannelRecv(#[from] async_channel::RecvError), + #[cfg(feature = "ws")] #[error("Ws Error: {0}")] WsError(#[from] async_tungstenite::tungstenite::Error), @@ -48,6 +49,7 @@ pub enum Error { #[error("Tls Error: {0}")] Rustls(#[from] tokio_rustls::rustls::Error), + #[cfg(feature = "tls")] #[error("Invalid DNS Name: {0}")] InvalidDnsNameError(#[from] rustls_pki_types::InvalidDnsNameError), -- cgit v1.2.3