1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 23:42:56 +01:00

allow to customize cfg parameter for FnNewService

This commit is contained in:
Nikolay Kim 2019-02-22 17:12:26 -08:00
parent 83a19e9cb3
commit 83f51b28d7

View File

@ -6,7 +6,7 @@ use futures::{Async, IntoFuture, Poll};
use super::{IntoConfigurableNewService, IntoNewService, IntoService, NewService, Service}; use super::{IntoConfigurableNewService, IntoNewService, IntoService, NewService, Service};
/// Create `NewService` for function that can act as Service /// Create `NewService` for function that can act as Service
pub fn fn_service<F, Req, Out>(f: F) -> FnNewService<F, Req, Out, ()> pub fn fn_service<F, Req, Out, Cfg>(f: F) -> FnNewService<F, Req, Out, Cfg>
where where
F: FnMut(Req) -> Out + Clone, F: FnMut(Req) -> Out + Clone,
Out: IntoFuture, Out: IntoFuture,