diff --git a/src/api/ruma_wrapper/axum.rs b/src/api/ruma_wrapper/axum.rs index 712386d9..a514c6b8 100644 --- a/src/api/ruma_wrapper/axum.rs +++ b/src/api/ruma_wrapper/axum.rs @@ -402,6 +402,7 @@ async fn ar_from_request_inner( impl FromRequest for Ar where T: IncomingRequest, + S: Sync, { type Rejection = Error; diff --git a/src/cli/serve.rs b/src/cli/serve.rs index e1bc79c7..c51c1232 100644 --- a/src/cli/serve.rs +++ b/src/cli/serve.rs @@ -209,13 +209,14 @@ struct ServerSpawner<'cfg, M> { impl<'cfg, M> ServerSpawner<'cfg, M> where - M: Layer + Clone + Send + 'static, + M: Layer + Clone + Send + Sync + 'static, M::Service: Service< axum::extract::Request, Response = axum::response::Response, Error = Infallible, > + Clone + Send + + Sync + 'static, >::Future: Send + 'static, { @@ -936,7 +937,7 @@ macro_rules! impl_ruma_handler { where Req: IncomingRequest + Send + 'static, Resp: IntoResponse, - F: FnOnce($($ty,)* Ar) -> Fut + Clone + Send + 'static, + F: FnOnce($($ty,)* Ar) -> Fut + Clone + Send + Sync + 'static, Fut: Future> + Send, E: IntoResponse,