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

@@ -1,5 +1,5 @@
use futures::{Future, Poll, Stream};
use http_types;
use http;
use tokio_service::Service;
use client::{Connect, Client, FutureResponse};
@@ -21,8 +21,8 @@ where C: Connect,
B: Stream<Error=Error> + 'static,
B::Item: AsRef<[u8]>,
{
type Request = http_types::Request<B>;
type Response = http_types::Response<Body>;
type Request = http::Request<B>;
type Response = http::Response<Body>;
type Error = Error;
type Future = CompatFutureResponse;
@@ -43,7 +43,7 @@ pub fn future(fut: FutureResponse) -> CompatFutureResponse {
}
impl Future for CompatFutureResponse {
type Item = http_types::Response<Body>;
type Item = http::Response<Body>;
type Error = Error;
fn poll(&mut self) -> Poll<Self::Item, Error> {

View File

@@ -10,7 +10,7 @@ use std::time::Duration;
use futures::{future, Poll, Async, Future, Stream};
use futures::unsync::oneshot;
#[cfg(feature = "compat")]
use http_types;
use http;
use tokio_io::{AsyncRead, AsyncWrite};
use tokio::reactor::Handle;
use tokio_proto::BindClient;
@@ -118,7 +118,7 @@ where C: Connect,
/// Send an `http::Request` using this Client.
#[inline]
#[cfg(feature = "compat")]
pub fn request_compat(&self, req: http_types::Request<B>) -> compat::CompatFutureResponse {
pub fn request_compat(&self, req: http::Request<B>) -> compat::CompatFutureResponse {
self::compat_impl::future(self.call(req.into()))
}