fix(http): make Chunk impl Sync

This commit is contained in:
Sean McArthur
2017-02-21 10:03:12 -08:00
parent 435fe84bf5
commit ee58409578
2 changed files with 7 additions and 4 deletions

View File

@@ -82,9 +82,11 @@ impl From<&'static str> for Body {
} }
} }
fn _assert_send() { fn _assert_send_sync() {
fn _assert<T: Send>() {} fn _assert_send<T: Send>() {}
fn _assert_sync<T: Sync>() {}
_assert::<Body>(); _assert_send::<Body>();
_assert::<Chunk>(); _assert_send::<Chunk>();
_assert_sync::<Chunk>();
} }

View File

@@ -392,6 +392,7 @@ impl Slice for RangeFull {
unsafe impl Send for MemBuf {} unsafe impl Send for MemBuf {}
unsafe impl Send for MemSlice {} unsafe impl Send for MemSlice {}
unsafe impl Sync for MemSlice {}
#[cfg(test)] #[cfg(test)]
impl<T: Read> ::http::io::MemRead for ::mock::AsyncIo<T> { impl<T: Read> ::http::io::MemRead for ::mock::AsyncIo<T> {