Remove Sync bound from TlsConnector io arg
This commit is contained in:
@@ -11,11 +11,7 @@ pub(crate) fn default_tls_config() -> std::sync::Arc<dyn TlsConnector> {
|
||||
}
|
||||
|
||||
impl TlsConnector for native_tls::TlsConnector {
|
||||
fn connect(
|
||||
&self,
|
||||
dns_name: &str,
|
||||
io: Box<dyn ReadWrite + Sync>,
|
||||
) -> Result<Box<dyn ReadWrite>, Error> {
|
||||
fn connect(&self, dns_name: &str, io: Box<dyn ReadWrite>) -> Result<Box<dyn ReadWrite>, Error> {
|
||||
let stream =
|
||||
native_tls::TlsConnector::connect(self, dns_name, io).map_err(|e| match e {
|
||||
native_tls::HandshakeError::Failure(e) => ErrorKind::ConnectionFailed
|
||||
@@ -31,7 +27,7 @@ impl TlsConnector for native_tls::TlsConnector {
|
||||
}
|
||||
|
||||
#[cfg(feature = "native-tls")]
|
||||
impl ReadWrite for native_tls::TlsStream<Box<dyn ReadWrite + Sync>> {
|
||||
impl ReadWrite for native_tls::TlsStream<Box<dyn ReadWrite>> {
|
||||
fn socket(&self) -> Option<&TcpStream> {
|
||||
self.get_ref().socket()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user