1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-21 07:36:43 +00:00

Merge branch 'master' of github.com:actix/actix-web

This commit is contained in:
Nikolay Kim 2019-07-30 08:00:57 -07:00
commit e9b4aa205f
5 changed files with 10 additions and 6 deletions

View file

@ -2,6 +2,10 @@
## [0.2.8] - 2019-07-xx
### Changed
* Add `Clone` impl for `HeaderMap`
### Fixed
* awc client panic #1016

View file

@ -89,11 +89,11 @@ pub trait ResponseError: fmt::Debug + fmt::Display {
}
}
impl ResponseError + 'static {
impl dyn ResponseError + 'static {
/// Downcasts a response error to a specific type.
pub fn downcast_ref<T: ResponseError + 'static>(&self) -> Option<&T> {
if self.__private_get_type_id__() == TypeId::of::<T>() {
unsafe { Some(&*(self as *const ResponseError as *const T)) }
unsafe { Some(&*(self as *const dyn ResponseError as *const T)) }
} else {
None
}

View file

@ -9,12 +9,12 @@ use http::HttpTryFrom;
/// `HeaderMap` is an multimap of [`HeaderName`] to values.
///
/// [`HeaderName`]: struct.HeaderName.html
#[derive(Debug)]
#[derive(Debug, Clone)]
pub struct HeaderMap {
pub(crate) inner: HashMap<HeaderName, Value>,
}
#[derive(Debug)]
#[derive(Debug, Clone)]
pub(crate) enum Value {
One(HeaderValue),
Multi(Vec<HeaderValue>),

View file

@ -133,7 +133,7 @@ impl AppConfig {
/// Set server host name.
///
/// Host name is used by application router aa a hostname for url
/// Host name is used by application router as a hostname for url
/// generation. Check [ConnectionInfo](./dev/struct.ConnectionInfo.
/// html#method.host) documentation for more information.
///

View file

@ -180,7 +180,7 @@ where
/// Set server host name.
///
/// Host name is used by application router aa a hostname for url
/// Host name is used by application router as a hostname for url
/// generation. Check [ConnectionInfo](./dev/struct.ConnectionInfo.
/// html#method.host) documentation for more information.
pub fn server_hostname<T: AsRef<str>>(mut self, val: T) -> Self {