1
0
mirror of https://github.com/fafhrd91/actix-web synced 2025-06-25 22:49:21 +02:00

remove some static contraints

This commit is contained in:
Nikolay Kim
2019-04-04 10:59:34 -07:00
parent dc7c3d37a1
commit bc834f6a03
15 changed files with 84 additions and 84 deletions

View File

@ -37,14 +37,14 @@ bitflags! {
}
/// Dispatcher for HTTP/1.1 protocol
pub struct Dispatcher<T, S: Service<Request = Request> + 'static, B: MessageBody>
pub struct Dispatcher<T, S: Service<Request = Request>, B: MessageBody>
where
S::Error: Debug,
{
inner: Option<InnerDispatcher<T, S, B>>,
}
struct InnerDispatcher<T, S: Service<Request = Request> + 'static, B: MessageBody>
struct InnerDispatcher<T, S: Service<Request = Request>, B: MessageBody>
where
S::Error: Debug,
{
@ -86,7 +86,7 @@ impl<S: Service<Request = Request>, B: MessageBody> State<S, B> {
impl<T, S, B> Dispatcher<T, S, B>
where
T: AsyncRead + AsyncWrite,
S: Service<Request = Request> + 'static,
S: Service<Request = Request>,
S::Error: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
@ -144,7 +144,7 @@ where
impl<T, S, B> InnerDispatcher<T, S, B>
where
T: AsyncRead + AsyncWrite,
S: Service<Request = Request> + 'static,
S: Service<Request = Request>,
S::Error: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,

View File

@ -30,7 +30,6 @@ where
S: NewService<SrvConfig, Request = Request>,
S::Error: Debug,
S::Response: Into<Response<B>>,
S::Service: 'static,
B: MessageBody,
{
/// Create new `HttpService` instance with default config.
@ -63,7 +62,6 @@ where
S: NewService<SrvConfig, Request = Request>,
S::Error: Debug,
S::Response: Into<Response<B>>,
S::Service: 'static,
B: MessageBody,
{
type Request = Io<T, P>;
@ -93,7 +91,6 @@ impl<T, P, S, B> Future for H1ServiceResponse<T, P, S, B>
where
T: AsyncRead + AsyncWrite,
S: NewService<SrvConfig, Request = Request>,
S::Service: 'static,
S::Error: Debug,
S::Response: Into<Response<B>>,
B: MessageBody,
@ -111,7 +108,7 @@ where
}
/// `Service` implementation for HTTP1 transport
pub struct H1ServiceHandler<T, P, S: 'static, B> {
pub struct H1ServiceHandler<T, P, S, B> {
srv: CloneableService<S>,
cfg: ServiceConfig,
_t: PhantomData<(T, P, B)>,