refactor(lib): rename http_types to http

This commit is contained in:
Sean McArthur
2017-09-29 18:12:55 -07:00
parent 6f71932015
commit 9c80fdbb9e
12 changed files with 97 additions and 97 deletions

View File

@@ -4,7 +4,7 @@ use std::mem::replace;
use std::net::SocketAddr;
#[cfg(feature = "compat")]
use http_types;
use http;
use header::Headers;
use proto::{Body, MessageHead, RequestHead, RequestLine};
@@ -138,11 +138,11 @@ impl<B> fmt::Debug for Request<B> {
}
#[cfg(feature = "compat")]
impl From<Request> for http_types::Request<Body> {
fn from(from_req: Request) -> http_types::Request<Body> {
impl From<Request> for http::Request<Body> {
fn from(from_req: Request) -> http::Request<Body> {
let (m, u, v, h, b) = from_req.deconstruct();
let to_req = http_types::Request::new(());
let to_req = http::Request::new(());
let (mut to_parts, _) = to_req.into_parts();
to_parts.method = m.into();
@@ -150,13 +150,13 @@ impl From<Request> for http_types::Request<Body> {
to_parts.version = v.into();
to_parts.headers = h.into();
http_types::Request::from_parts(to_parts, b)
http::Request::from_parts(to_parts, b)
}
}
#[cfg(feature = "compat")]
impl<B> From<http_types::Request<B>> for Request<B> {
fn from(from_req: http_types::Request<B>) -> Request<B> {
impl<B> From<http::Request<B>> for Request<B> {
fn from(from_req: http::Request<B>) -> Request<B> {
let (from_parts, body) = from_req.into_parts();
let mut to_req = Request::new(from_parts.method.into(), from_parts.uri.into());