1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-08-20 04:35:38 +02:00

more tests

This commit is contained in:
Nikolay Kim
2019-03-12 22:57:09 -07:00
parent 28f01beaec
commit 86405cfe7a
4 changed files with 179 additions and 8 deletions

View File

@@ -182,8 +182,8 @@ where
/// Host name is used by application router aa a hostname for url
/// generation. Check [ConnectionInfo](./dev/struct.ConnectionInfo.
/// html#method.host) documentation for more information.
pub fn server_hostname(mut self, val: String) -> Self {
self.host = Some(val);
pub fn server_hostname<T: AsRef<str>>(mut self, val: T) -> Self {
self.host = Some(val.as_ref().to_owned());
self
}