Skip to content

Commit

Permalink
chore(server): Remove unnecessary trait bound from ServerIo::connect_…
Browse files Browse the repository at this point in the history
…info (#1801)
  • Loading branch information
tottoto authored Jul 15, 2024
1 parent b6ad603 commit ad1a95d
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions tonic/src/transport/server/service/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,27 +32,16 @@ impl<IO> ServerIo<IO> {
Self::TlsIo(Box::new(io))
}

#[cfg(feature = "tls")]
pub(in crate::transport) fn connect_info(&self) -> ServerIoConnectInfo<IO>
where
IO: Connected,
TlsStream<IO>: Connected,
{
match self {
Self::Io(io) => Either::A(io.connect_info()),
#[cfg(feature = "tls")]
Self::TlsIo(io) => Either::B(io.connect_info()),
}
}

#[cfg(not(feature = "tls"))]
pub(in crate::transport) fn connect_info(&self) -> ServerIoConnectInfo<IO>
where
IO: Connected,
{
match self {
Self::Io(io) => Either::A(io.connect_info()),
}
}
}

impl<IO> AsyncRead for ServerIo<IO>
Expand Down

0 comments on commit ad1a95d

Please sign in to comment.