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

@@ -3,7 +3,7 @@ use std::fmt::{Display, self};
use std::str::{self, FromStr};
#[cfg(feature = "compat")]
use http_types;
use http;
use ::common::ByteStr;
use bytes::{BufMut, Bytes, BytesMut};
@@ -319,18 +319,18 @@ impl Display for Uri {
}
#[cfg(feature = "compat")]
impl From<http_types::Uri> for Uri {
fn from(uri: http_types::Uri) -> Uri {
impl From<http::Uri> for Uri {
fn from(uri: http::Uri) -> Uri {
uri.to_string().parse()
.expect("attempted to convert invalid uri")
}
}
#[cfg(feature = "compat")]
impl From<Uri> for http_types::Uri {
fn from(uri: Uri) -> http_types::Uri {
impl From<Uri> for http::Uri {
fn from(uri: Uri) -> http::Uri {
let bytes = uri.source.into_bytes();
http_types::Uri::from_shared(bytes)
http::Uri::from_shared(bytes)
.expect("attempted to convert invalid uri")
}
}