remove all public mention of HttpVersion

Closes #123
This commit is contained in:
Sean McArthur
2017-06-01 17:02:59 -07:00
parent e176dcebca
commit 7fc47fb908
2 changed files with 0 additions and 17 deletions

View File

@@ -152,7 +152,6 @@ pub use hyper::header;
pub use hyper::mime; pub use hyper::mime;
pub use hyper::method::Method; pub use hyper::method::Method;
pub use hyper::status::StatusCode; pub use hyper::status::StatusCode;
pub use hyper::version::HttpVersion;
pub use hyper::Url; pub use hyper::Url;
pub use url::ParseError as UrlError; pub use url::ParseError as UrlError;

View File

@@ -3,7 +3,6 @@ use std::io::{self, Read};
use hyper::header::{Headers, ContentEncoding, ContentLength, Encoding, TransferEncoding}; use hyper::header::{Headers, ContentEncoding, ContentLength, Encoding, TransferEncoding};
use hyper::status::StatusCode; use hyper::status::StatusCode;
use hyper::version::HttpVersion;
use hyper::Url; use hyper::Url;
use libflate::gzip; use libflate::gzip;
use serde::de::DeserializeOwned; use serde::de::DeserializeOwned;
@@ -30,7 +29,6 @@ impl fmt::Debug for Response {
.field("url", &hyper_response.url) .field("url", &hyper_response.url)
.field("status", &hyper_response.status) .field("status", &hyper_response.status)
.field("headers", &hyper_response.headers) .field("headers", &hyper_response.headers)
.field("version", &hyper_response.version)
.finish() .finish()
} }
Decoder::Gzip { ref head, .. } | Decoder::Gzip { ref head, .. } |
@@ -39,7 +37,6 @@ impl fmt::Debug for Response {
.field("url", &head.url) .field("url", &head.url)
.field("status", &head.status) .field("status", &head.status)
.field("headers", &head.headers) .field("headers", &head.headers)
.field("version", &head.version)
.finish() .finish()
} }
} }
@@ -77,16 +74,6 @@ impl Response {
} }
} }
/// Get the `HttpVersion`.
#[inline]
pub fn version(&self) -> &HttpVersion {
match self.inner {
Decoder::PlainText(ref hyper_response) => &hyper_response.version,
Decoder::Gzip { ref head, .. } |
Decoder::Errored { ref head, .. } => &head.version,
}
}
/// Try and deserialize the response body as JSON using `serde`. /// Try and deserialize the response body as JSON using `serde`.
/// ///
/// # Examples /// # Examples
@@ -192,7 +179,6 @@ fn new_gzip(mut res: ::hyper::client::Response) -> Decoder {
headers: res.headers.clone(), headers: res.headers.clone(),
status: res.status, status: res.status,
url: res.url.clone(), url: res.url.clone(),
version: res.version,
} }
} }
} }
@@ -201,7 +187,6 @@ fn new_gzip(mut res: ::hyper::client::Response) -> Decoder {
headers: res.headers.clone(), headers: res.headers.clone(),
status: res.status, status: res.status,
url: res.url.clone(), url: res.url.clone(),
version: res.version,
}; };
let reader = Peeked { let reader = Peeked {
@@ -223,7 +208,6 @@ fn new_gzip(mut res: ::hyper::client::Response) -> Decoder {
struct Head { struct Head {
headers: ::hyper::header::Headers, headers: ::hyper::header::Headers,
url: ::hyper::Url, url: ::hyper::Url,
version: ::hyper::version::HttpVersion,
status: ::hyper::status::StatusCode, status: ::hyper::status::StatusCode,
} }