mirror of
https://github.com/fafhrd91/actix-web
synced 2025-08-31 00:50:20 +02:00
Impl From<usize> and From<Option<usize>> for KeepAlive
This commit is contained in:
@@ -124,8 +124,8 @@ impl<H> HttpServer<H> where H: IntoHttpHandler + 'static
|
||||
/// Set server keep-alive setting.
|
||||
///
|
||||
/// By default keep alive is set to a `Os`.
|
||||
pub fn keep_alive(mut self, val: KeepAlive) -> Self {
|
||||
self.keep_alive = val;
|
||||
pub fn keep_alive<T: Into<KeepAlive>>(mut self, val: T) -> Self {
|
||||
self.keep_alive = val.into();
|
||||
self
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user