From 20f6c3b509c9b7b2b0e362c6651faef06233bf0e Mon Sep 17 00:00:00 2001 From: David Pedersen Date: Thu, 26 Aug 2021 08:24:21 +0200 Subject: [PATCH] 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. --- CHANGELOG.md | 1 + src/routing/mod.rs | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 94b24f1c..772df5c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **fixed:** Fix URI captures matching empty segments. This means requests with URI `/` will no longer be matched by `/:key` ([#264](https://github.com/tokio-rs/axum/pull/264)) +- **fixed:** Remove needless trait bounds from `Router::boxed` ([#264](https://github.com/tokio-rs/axum/pull/264)) # 0.2.1 (24. August, 2021) diff --git a/src/routing/mod.rs b/src/routing/mod.rs index 641093cb..c8456618 100644 --- a/src/routing/mod.rs +++ b/src/routing/mod.rs @@ -257,12 +257,11 @@ impl Router { pub fn boxed(self) -> Router> where S: Service, Response = Response> + Send + 'static, - S::Error: Into + Send + Sync, + S::Error: Into + Send, S::Future: Send, - ReqBody: http_body::Body + Send + Sync + 'static, - ReqBody::Error: Into + Send + Sync + 'static, + ReqBody: Send + 'static, ResBody: http_body::Body + Send + Sync + 'static, - ResBody::Error: Into + Send + Sync + 'static, + ResBody::Error: Into, { self.map(|svc| { ServiceBuilder::new()