Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tls): remove redundant i/o bounds (#3647)
this commit removes a redundant set of trait bounds from `linkerd_tls::Client<L, C>`'s `tower::Service<T>` implementation. this client type is generic over a `C`-typed `MakeConnection`. this trait is effectively an alias for particular services, and already by definition is prerequisite upon `Connection` responses that are an asynchronous reader/writer. see the definition of the trait, here: ```rust // linkerd/stack/src/connect.rs pub trait MakeConnection<T> { /// An I/O type that represents a connection to the remote endpoint. type Connection: AsyncRead + AsyncWrite; /// Metadata associated with the established connection. type Metadata; type Error: Into<Error>; type Future: Future<Output = Result<(Self::Connection, Self::Metadata), Self::Error>>; /// Determines whether the connector is ready to establish a connection. fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>; /// Establishes a connection. fn connect(&mut self, t: T) -> Self::Future; // contd... } ``` thus, we can remove these bounds from the tls client. the connection is already, by virtue of `C: MakeConnection`, an `AsyncRead + AsyncWrite` type. see linkerd/linkerd2#8733. Signed-off-by: katelyn martin <[email protected]>
- Loading branch information