Skip to content

Commit

Permalink
Add Send trait bound to async protocol structs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyonson committed Oct 2, 2024
1 parent 1e42825 commit 6de7142
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions protocol/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,8 @@ impl fmt::Display for ProtocolError {
#[cfg(feature = "async")]
pub struct AsyncProtocol<R, W>
where
R: AsyncRead + Unpin,
W: AsyncWrite + Unpin,
R: AsyncRead + Unpin + Send,
W: AsyncWrite + Unpin + Send,
{
reader: AsyncProtocolReader<R>,
writer: AsyncProtocolWriter<W>,
Expand All @@ -990,8 +990,8 @@ where
#[cfg(feature = "async")]
impl<R, W> AsyncProtocol<R, W>
where
R: AsyncRead + Unpin,
W: AsyncWrite + Unpin,
R: AsyncRead + Unpin + Send,
W: AsyncWrite + Unpin + Send,
{
/// New protocol session which completes the initial handshake and returns a handler.
///
Expand Down Expand Up @@ -1115,7 +1115,7 @@ enum DecryptState {
#[cfg(feature = "async")]
pub struct AsyncProtocolReader<R>
where
R: AsyncRead + Unpin,
R: AsyncRead + Unpin + Send,
{
buffer: R,
packet_reader: PacketReader,
Expand All @@ -1125,7 +1125,7 @@ where
#[cfg(feature = "async")]
impl<R> AsyncProtocolReader<R>
where
R: AsyncRead + Unpin,
R: AsyncRead + Unpin + Send,
{
/// Decrypt contents of received packet from buffer.
///
Expand Down Expand Up @@ -1162,7 +1162,7 @@ where
#[cfg(feature = "async")]
pub struct AsyncProtocolWriter<W>
where
W: AsyncWrite + Unpin,
W: AsyncWrite + Unpin + Send,
{
buffer: W,
packet_writer: PacketWriter,
Expand All @@ -1171,7 +1171,7 @@ where
#[cfg(feature = "async")]
impl<W> AsyncProtocolWriter<W>
where
W: AsyncWrite + Unpin,
W: AsyncWrite + Unpin + Send,
{
/// Encrypt contents and write packet buffer.
///
Expand Down

0 comments on commit 6de7142

Please sign in to comment.