Remove needless traits bounds from Router::boxed (#269)

Turns out these bounds weren't actually needed.

I was hoping it would speed up compile times but that isn't the case.
This commit is contained in:
David Pedersen
2021-08-26 08:24:21 +02:00
committed by GitHub
parent 0d2db387a8
commit 20f6c3b509
2 changed files with 4 additions and 4 deletions
+3 -4
View File
@@ -257,12 +257,11 @@ impl<S> Router<S> {
pub fn boxed<ReqBody, ResBody>(self) -> Router<BoxRoute<ReqBody, S::Error>>
where
S: Service<Request<ReqBody>, Response = Response<ResBody>> + Send + 'static,
S::Error: Into<BoxError> + Send + Sync,
S::Error: Into<BoxError> + Send,
S::Future: Send,
ReqBody: http_body::Body<Data = Bytes> + Send + Sync + 'static,
ReqBody::Error: Into<BoxError> + Send + Sync + 'static,
ReqBody: Send + 'static,
ResBody: http_body::Body<Data = Bytes> + Send + Sync + 'static,
ResBody::Error: Into<BoxError> + Send + Sync + 'static,
ResBody::Error: Into<BoxError>,
{
self.map(|svc| {
ServiceBuilder::new()