Export http::header::HeaderValue as http::HeaderValue (#222)

This commit is contained in:
Josh Leeb-du Toit
2019-06-27 06:11:05 +10:00
committed by Carl Lerche
parent 518b57ada5
commit 1cc157eaeb
2 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -5,7 +5,7 @@ extern crate http;
extern crate test;
use bytes::Bytes;
use http::header::HeaderValue;
use http::HeaderValue;
use test::Bencher;
static SHORT: &'static [u8] = b"localhost";
+5 -5
View File
@@ -55,8 +55,8 @@
//! to edit the request/response:
//!
//! ```
//! use http::{Response, StatusCode};
//! use http::header::{CONTENT_TYPE, HeaderValue};
//! use http::{HeaderValue, Response, StatusCode};
//! use http::header::CONTENT_TYPE;
//!
//! fn add_server_headers<T>(response: &mut Response<T>) {
//! response.headers_mut()
@@ -118,7 +118,7 @@
//! function:
//!
//! ```
//! use http::header::HeaderValue;
//! use http::HeaderValue;
//!
//! let value = HeaderValue::from_static("text/html");
//! assert_eq!(value.as_bytes(), b"text/html");
@@ -127,7 +127,7 @@
//! And header values can also be parsed like names:
//!
//! ```
//! use http::header::HeaderValue;
//! use http::HeaderValue;
//!
//! let value = "text/html";
//! let value = value.parse::<HeaderValue>().unwrap();
@@ -180,7 +180,7 @@ pub use convert::HttpTryFrom;
pub use error::{Error, Result};
pub use extensions::Extensions;
#[doc(no_inline)]
pub use header::HeaderMap;
pub use header::{HeaderMap, HeaderValue};
pub use method::Method;
pub use request::Request;
pub use response::Response;