mirror of https://github.com/rwf2/Rocket.git
Use 'to_string' to format Hyper headers.
This commit is contained in:
parent
5fabb43a1b
commit
35bbb8b60b
|
@ -19,7 +19,7 @@ categories = ["web-programming::http-server"]
|
|||
term-painter = "^0.2"
|
||||
log = "^0.3"
|
||||
url = "^1"
|
||||
hyper = { version = "0.10", default-features = false }
|
||||
hyper = { version = "0.10.4", default-features = false }
|
||||
toml = { version = "^0.2", default-features = false }
|
||||
num_cpus = "1"
|
||||
state = "^0.2"
|
||||
|
|
|
@ -27,7 +27,6 @@ pub use hyper::mime;
|
|||
pub mod header {
|
||||
use http::Header;
|
||||
|
||||
use hyper::header::HeaderFormatter;
|
||||
use hyper::header::Header as HyperHeaderTrait;
|
||||
|
||||
macro_rules! import_hyper_items {
|
||||
|
@ -38,8 +37,7 @@ pub mod header {
|
|||
($($name:ident),*) => ($(
|
||||
impl ::std::convert::From<self::$name> for Header<'static> {
|
||||
fn from(header: self::$name) -> Header<'static> {
|
||||
let formatter = HeaderFormatter(&header);
|
||||
Header::new($name::header_name(), format!("{}", formatter))
|
||||
Header::new($name::header_name(), header.to_string())
|
||||
}
|
||||
}
|
||||
)*)
|
||||
|
|
Loading…
Reference in New Issue