mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Require Sync for services (#2473)
Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
co-authored by
Jonas Platte
parent
19101f624d
commit
52fd139a86
@@ -165,7 +165,7 @@ pub trait RouterExt<S>: sealed::Sealed {
|
||||
/// This works like [`RouterExt::route_with_tsr`] but accepts any [`Service`].
|
||||
fn route_service_with_tsr<T>(self, path: &str, service: T) -> Self
|
||||
where
|
||||
T: Service<Request, Error = Infallible> + Clone + Send + 'static,
|
||||
T: Service<Request, Error = Infallible> + Clone + Send + Sync + 'static,
|
||||
T::Response: IntoResponse,
|
||||
T::Future: Send + 'static,
|
||||
Self: Sized;
|
||||
@@ -268,7 +268,7 @@ where
|
||||
#[track_caller]
|
||||
fn route_service_with_tsr<T>(mut self, path: &str, service: T) -> Self
|
||||
where
|
||||
T: Service<Request, Error = Infallible> + Clone + Send + 'static,
|
||||
T: Service<Request, Error = Infallible> + Clone + Send + Sync + 'static,
|
||||
T::Response: IntoResponse,
|
||||
T::Future: Send + 'static,
|
||||
Self: Sized,
|
||||
|
||||
Reference in New Issue
Block a user