Skip to content

Commit a4b3960

Browse files
author
Devdutt Shenoi
committed
fix: enable sync only for builds without websocket support
1 parent d3ebb51 commit a4b3960

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

rumqttc/src/framed.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,5 +92,11 @@ impl Network {
9292
}
9393
}
9494

95-
pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Sync + Unpin {}
96-
impl<T> AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Sync + Unpin {}
95+
#[cfg(not(feature = "websocket"))]
96+
pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Unpin {}
97+
#[cfg(not(feature = "websocket"))]
98+
impl<T> AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Unpin {}
99+
#[cfg(feature = "websocket")]
100+
pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Unpin {}
101+
#[cfg(feature = "websocket")]
102+
impl<T> AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Unpin {}

0 commit comments

Comments
 (0)