mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-24 00:01:11 +01:00
use FnMut instead of Fn
This commit is contained in:
parent
f94ef5248e
commit
b6414d6197
@ -17,7 +17,7 @@ where
|
||||
impl<T, F, In, Out, Request> Apply<T, F, In, Out, Request>
|
||||
where
|
||||
T: Service<Request>,
|
||||
F: Fn(In, &mut T) -> Out,
|
||||
F: FnMut(In, &mut T) -> Out,
|
||||
Out: IntoFuture,
|
||||
Out::Error: From<T::Error>,
|
||||
{
|
||||
@ -48,7 +48,7 @@ where
|
||||
impl<T, F, In, Out, Request> Service<In> for Apply<T, F, In, Out, Request>
|
||||
where
|
||||
T: Service<Request>,
|
||||
F: Fn(In, &mut T) -> Out,
|
||||
F: FnMut(In, &mut T) -> Out,
|
||||
Out: IntoFuture,
|
||||
Out::Error: From<T::Error>,
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ pub trait ServiceExt<Request>: Service<Request> {
|
||||
Self: Sized,
|
||||
T: Service<Req, Error = Self::Error>,
|
||||
I: IntoService<T, Req>,
|
||||
F: Fn(Self::Response, &mut T) -> Out,
|
||||
F: FnMut(Self::Response, &mut T) -> Out,
|
||||
Out: IntoFuture<Error = Self::Error>,
|
||||
{
|
||||
self.and_then(Apply::new(service.into_service(), f))
|
||||
@ -191,7 +191,7 @@ pub trait NewService<Request> {
|
||||
Self: Sized,
|
||||
T: NewService<Req, InitError = Self::InitError, Error = Self::Error>,
|
||||
I: IntoNewService<T, Req>,
|
||||
F: Fn(Self::Response, &mut T::Service) -> Out + Clone,
|
||||
F: FnMut(Self::Response, &mut T::Service) -> Out + Clone,
|
||||
Out: IntoFuture<Error = Self::Error>,
|
||||
{
|
||||
self.and_then(ApplyNewService::new(service, f))
|
||||
|
Loading…
Reference in New Issue
Block a user