Merge pull request #61 from hyperium/assert-send

enforce Request/Response to be Send
This commit is contained in:
Jonathan Reem
2014-09-25 16:01:29 -04:00

View File

@@ -211,3 +211,12 @@ pub enum HttpError {
HttpIoError(IoError),
}
//FIXME: when Opt-in Built-in Types becomes a thing, we can force these structs
//to be Send. For now, this has the compiler do a static check.
fn _assert_send<T: Send>() {
_assert_send::<client::Request<net::Fresh>>();
_assert_send::<client::Response>();
_assert_send::<server::Request>();
_assert_send::<server::Response<net::Fresh>>();
}