mirror of
https://github.com/fafhrd91/actix-net
synced 2024-11-23 22:51:07 +01:00
use new service converter
This commit is contained in:
parent
615a0d52ed
commit
0bee4db270
@ -43,15 +43,9 @@ where
|
||||
T::Service: 'static,
|
||||
<T::Service as Service<Request<S>>>::Future: 'static,
|
||||
{
|
||||
// pub fn new<F: IntoNewService<T, Request<S>>>(factory: F) -> Self {
|
||||
// Self {
|
||||
// factory: Rc::new(factory.into_new_service()),
|
||||
// _t: PhantomData,
|
||||
// }
|
||||
// }
|
||||
pub fn new(factory: T) -> Self {
|
||||
pub fn new<F: IntoNewService<T, Request<S>>>(factory: F) -> Self {
|
||||
Self {
|
||||
factory: Rc::new(factory),
|
||||
factory: Rc::new(factory.into_new_service()),
|
||||
_t: PhantomData,
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user