mirror of
https://github.com/fafhrd91/actix-net
synced 2025-08-31 18:36:59 +02:00
service improvements (#233)
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
use std::pin::Pin;
|
||||
use std::task::{Context, Poll};
|
||||
use std::{future::Future, marker::PhantomData};
|
||||
use alloc::boxed::Box;
|
||||
use core::{
|
||||
future::Future,
|
||||
marker::PhantomData,
|
||||
pin::Pin,
|
||||
task::{Context, Poll},
|
||||
};
|
||||
|
||||
use futures_util::future::FutureExt;
|
||||
|
||||
@@ -28,7 +32,7 @@ where
|
||||
{
|
||||
BoxServiceFactory(Box::new(FactoryWrapper {
|
||||
factory,
|
||||
_t: std::marker::PhantomData,
|
||||
_t: PhantomData,
|
||||
}))
|
||||
}
|
||||
|
||||
@@ -75,12 +79,9 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
struct FactoryWrapper<SF, Req, C>
|
||||
where
|
||||
SF: ServiceFactory<Req>,
|
||||
{
|
||||
struct FactoryWrapper<SF, Req, Cfg> {
|
||||
factory: SF,
|
||||
_t: PhantomData<(C, Req)>,
|
||||
_t: PhantomData<(Req, Cfg)>,
|
||||
}
|
||||
|
||||
impl<SF, Req, Cfg, Res, Err, InitErr> ServiceFactory<Req> for FactoryWrapper<SF, Req, Cfg>
|
||||
|
Reference in New Issue
Block a user