mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-27 20:12:58 +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>
|
impl<T, F, In, Out, Request> Apply<T, F, In, Out, Request>
|
||||||
where
|
where
|
||||||
T: Service<Request>,
|
T: Service<Request>,
|
||||||
F: Fn(In, &mut T) -> Out,
|
F: FnMut(In, &mut T) -> Out,
|
||||||
Out: IntoFuture,
|
Out: IntoFuture,
|
||||||
Out::Error: From<T::Error>,
|
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>
|
impl<T, F, In, Out, Request> Service<In> for Apply<T, F, In, Out, Request>
|
||||||
where
|
where
|
||||||
T: Service<Request>,
|
T: Service<Request>,
|
||||||
F: Fn(In, &mut T) -> Out,
|
F: FnMut(In, &mut T) -> Out,
|
||||||
Out: IntoFuture,
|
Out: IntoFuture,
|
||||||
Out::Error: From<T::Error>,
|
Out::Error: From<T::Error>,
|
||||||
{
|
{
|
||||||
|
@ -66,7 +66,7 @@ pub trait ServiceExt<Request>: Service<Request> {
|
|||||||
Self: Sized,
|
Self: Sized,
|
||||||
T: Service<Req, Error = Self::Error>,
|
T: Service<Req, Error = Self::Error>,
|
||||||
I: IntoService<T, Req>,
|
I: IntoService<T, Req>,
|
||||||
F: Fn(Self::Response, &mut T) -> Out,
|
F: FnMut(Self::Response, &mut T) -> Out,
|
||||||
Out: IntoFuture<Error = Self::Error>,
|
Out: IntoFuture<Error = Self::Error>,
|
||||||
{
|
{
|
||||||
self.and_then(Apply::new(service.into_service(), f))
|
self.and_then(Apply::new(service.into_service(), f))
|
||||||
@ -191,7 +191,7 @@ pub trait NewService<Request> {
|
|||||||
Self: Sized,
|
Self: Sized,
|
||||||
T: NewService<Req, InitError = Self::InitError, Error = Self::Error>,
|
T: NewService<Req, InitError = Self::InitError, Error = Self::Error>,
|
||||||
I: IntoNewService<T, Req>,
|
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>,
|
Out: IntoFuture<Error = Self::Error>,
|
||||||
{
|
{
|
||||||
self.and_then(ApplyNewService::new(service, f))
|
self.and_then(ApplyNewService::new(service, f))
|
||||||
|
Loading…
Reference in New Issue
Block a user