mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-24 00:01:11 +01:00
convert to new service
This commit is contained in:
parent
a928d82895
commit
061a0339ff
@ -1,7 +1,7 @@
|
||||
use std::marker::PhantomData;
|
||||
|
||||
use futures::{Async, Future, Poll};
|
||||
use {NewService, Service};
|
||||
use {NewService, Service, IntoNewService};
|
||||
|
||||
/// `ApplyService` service combinator
|
||||
pub struct ApplyService<T, F, R, Req, Resp, Err> {
|
||||
@ -70,10 +70,10 @@ where
|
||||
R: Future<Item = Resp, Error = Err>,
|
||||
{
|
||||
/// Create new `Partial` new service instance
|
||||
pub fn new(f: F, service: T) -> Self {
|
||||
pub fn new<F1: IntoNewService<T>>(f: F, service: F1) -> Self {
|
||||
Self {
|
||||
service,
|
||||
f,
|
||||
service: service.into_new_service(),
|
||||
r: PhantomData,
|
||||
r1: PhantomData,
|
||||
r2: PhantomData,
|
||||
|
Loading…
Reference in New Issue
Block a user