1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 18:02:58 +01:00

use FnMut instead of Fn

This commit is contained in:
Nikolay Kim 2019-01-16 15:00:23 -08:00
parent f94ef5248e
commit b6414d6197
2 changed files with 4 additions and 4 deletions

View File

@ -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>,
{

View File

@ -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))