1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-24 01:11:07 +01:00

use new service converter

This commit is contained in:
Nikolay Kim 2019-01-13 23:30:42 -08:00
parent 615a0d52ed
commit 0bee4db270

View File

@ -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,
}
}