Add Send + Sync marker traits to into_reader.

This allows the resulting Read to be shared among threads.
This commit is contained in:
Jacob Hoffman-Andrews
2020-09-25 00:07:28 -07:00
committed by Martin Algesten
parent 7046b07518
commit 5e00b5c5e3
2 changed files with 4 additions and 5 deletions

View File

@@ -32,7 +32,7 @@ pub enum Stream {
Https(BufReader<TlsStream<TcpStream>>),
Cursor(Cursor<Vec<u8>>),
#[cfg(test)]
Test(Box<dyn BufRead + Send>, Vec<u8>),
Test(Box<dyn BufRead + Send + Sync>, Vec<u8>),
}
// DeadlineStream wraps a stream such that read() will return an error