Skip to content

Commit

Permalink
Make Streaming<T> Sync
Browse files Browse the repository at this point in the history
Safe because there are no `&self` methods on `Streaming<T>` that access any of its non `Sync` members.

Fixes hyperium#81
  • Loading branch information
NeoLegends committed Oct 21, 2019
1 parent 5d0a795 commit 4ff1583
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions tonic/src/codec/decode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ pub struct Streaming<T> {
trailers: Option<MetadataMap>,
}

unsafe impl<T> Sync for Streaming<T> {}
impl<T> Unpin for Streaming<T> {}

#[derive(Debug)]
Expand Down

0 comments on commit 4ff1583

Please sign in to comment.