diff --git a/rumqttc/src/framed.rs b/rumqttc/src/framed.rs index ec0e6ba6d..ef86382d6 100644 --- a/rumqttc/src/framed.rs +++ b/rumqttc/src/framed.rs @@ -92,5 +92,11 @@ impl Network { } } +#[cfg(not(feature = "websocket"))] pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Sync + Unpin {} +#[cfg(not(feature = "websocket"))] impl AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Sync + Unpin {} +#[cfg(feature = "websocket")] +pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Unpin {} +#[cfg(feature = "websocket")] +impl AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Unpin {}