fix(rustup): Add PhantomData markers to phantom type users

Necessary since [RFC 738](https://github.com/rust-lang/rfcs/blob/master/text/0738-variance.md).
This commit is contained in:
Renato Zannon
2015-02-21 03:45:51 -02:00
committed by Sean McArthur
parent 039e984f68
commit 1904c4561f
4 changed files with 26 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
//! Client Requests
use std::old_io::{BufferedWriter, IoResult};
use std::marker::PhantomData;
use url::Url;
@@ -25,6 +26,8 @@ pub struct Request<W> {
body: HttpWriter<BufferedWriter<Box<NetworkStream + Send>>>,
headers: Headers,
method: method::Method,
_marker: PhantomData<W>,
}
impl<W> Request<W> {
@@ -66,7 +69,8 @@ impl Request<Fresh> {
headers: headers,
url: url,
version: version::HttpVersion::Http11,
body: stream
body: stream,
_marker: PhantomData,
})
}
@@ -136,7 +140,8 @@ impl Request<Fresh> {
headers: self.headers,
url: self.url,
version: self.version,
body: stream
body: stream,
_marker: PhantomData,
})
}