1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-08-26 11:24:47 +02:00

better ergonomics for .apply combinator

This commit is contained in:
Nikolay Kim
2019-01-24 20:41:42 -08:00
parent 88548199d7
commit 0340d82314
2 changed files with 28 additions and 17 deletions

View File

@@ -71,7 +71,7 @@ pub trait ServiceExt<Request>: Service<Request> {
I: IntoService<B, Req>,
F: FnMut(Self::Response, &mut B) -> Out,
Out: IntoFuture,
Out::Error: From<Self::Error>,
Out::Error: Into<Self::Error>,
{
AndThenApply::new(self, service, f)
}
@@ -197,7 +197,7 @@ pub trait NewService<Request> {
I: IntoNewService<B, Req>,
F: FnMut(Self::Response, &mut B::Service) -> Out,
Out: IntoFuture,
Out::Error: From<Self::Error>,
Out::Error: Into<Self::Error>,
{
AndThenApplyNewService::new(self, service, f)
}