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:
@@ -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,
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user