mirror of
https://github.com/actix/actix-web.git
synced 2024-12-30 12:00:38 +00:00
Merge branch 'master' of github.com:actix/actix-web
This commit is contained in:
commit
e9b4aa205f
5 changed files with 10 additions and 6 deletions
|
@ -2,6 +2,10 @@
|
|||
|
||||
## [0.2.8] - 2019-07-xx
|
||||
|
||||
### Changed
|
||||
|
||||
* Add `Clone` impl for `HeaderMap`
|
||||
|
||||
### Fixed
|
||||
|
||||
* awc client panic #1016
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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>),
|
||||
|
|
|
@ -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.
|
||||
///
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue