Add Sync traits to ReadWrite trait (#528)

This allows us to get rid of a Mutex (and not take a dependency on
sync_wrapper).
This commit is contained in:
Jacob Hoffman-Andrews
2022-07-05 01:52:25 -07:00
committed by GitHub
parent 9395046029
commit 0cf1f8dbb9
2 changed files with 5 additions and 6 deletions

View File

@@ -18,7 +18,7 @@ use crate::error::ErrorKind;
use crate::unit::Unit;
/// Trait for things implementing [std::io::Read] + [std::io::Write]. Used in [TlsConnector].
pub trait ReadWrite: Read + Write + Send + fmt::Debug + 'static {
pub trait ReadWrite: Read + Write + Send + Sync + fmt::Debug + 'static {
fn socket(&self) -> Option<&TcpStream>;
fn is_poolable(&self) -> bool;