summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--src/routing/mod.rs7
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<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()