Skip to content

Commit

Permalink
fix: enable sync only for builds without websocket support
Browse files Browse the repository at this point in the history
  • Loading branch information
de-sh committed Aug 8, 2024
1 parent d3ebb51 commit a4b3960
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions rumqttc/src/framed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,11 @@ impl Network {
}
}

pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Sync + Unpin {}
impl<T> AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Sync + Unpin {}
#[cfg(not(feature = "websocket"))]
pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Unpin {}
#[cfg(not(feature = "websocket"))]
impl<T> AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Unpin {}
#[cfg(feature = "websocket")]
pub trait AsyncReadWrite: AsyncRead + AsyncWrite + Send + Unpin {}
#[cfg(feature = "websocket")]
impl<T> AsyncReadWrite for T where T: AsyncRead + AsyncWrite + Send + Unpin {}

0 comments on commit a4b3960

Please sign in to comment.