From a0bcf620c29443fac91af79aa151fb6cd16208a5 Mon Sep 17 00:00:00 2001 From: Devdutt Shenoi Date: Fri, 9 Aug 2024 09:33:39 +0530 Subject: [PATCH] fix: enable sync only for builds without websocket support --- rumqttc/src/framed.rs | 6 ++++++ 1 file changed, 6 insertions(+) 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 {}