1
0
mirror of https://github.com/fafhrd91/actix-net synced 2025-09-02 07:16:37 +02:00

Revert "use From/Into instead of custom IntoService and IntoNewService traits"

This reverts commit 9441624827.
This commit is contained in:
Nikolay Kim
2018-09-04 09:49:21 -07:00
parent dfa08b3bf1
commit 0390ff37d3
7 changed files with 72 additions and 25 deletions

View File

@@ -1,8 +1,7 @@
use std::marker::PhantomData;
use futures::{Async, Future, IntoFuture, Poll};
use {NewService, Service};
use {IntoNewService, NewService, Service};
/// `Apply` service combinator
pub struct Apply<T, F, R, Req> {
@@ -63,10 +62,10 @@ where
R: IntoFuture,
{
/// Create new `ApplyNewService` new service instance
pub fn new<F1: Into<T>>(f: F, service: F1) -> Self {
pub fn new<F1: IntoNewService<T>>(f: F, service: F1) -> Self {
Self {
f,
service: service.into(),
service: service.into_new_service(),
r: PhantomData,
}
}