1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-11-20 12:02:22 +03:00

WIP: better HTTP listeners

This commit is contained in:
Quentin Gliech
2022-09-30 17:49:52 +02:00
parent 93ce5c797c
commit 7fbfb74a5e
6 changed files with 127 additions and 37 deletions

View File

@@ -252,7 +252,7 @@ where
#[must_use]
#[allow(clippy::trait_duplication_in_bounds)]
pub fn router<S, B>(state: S) -> Router<S, B>
pub fn router<S, B>(state: Arc<S>) -> Router<S, B>
where
B: HttpBody + Send + 'static,
<B as HttpBody>::Data: Send,
@@ -267,8 +267,6 @@ where
Mailer: FromRef<S>,
MatrixHomeserver: FromRef<S>,
{
let state = Arc::new(state);
let api_router = api_router(state.clone());
let compat_router = compat_router(state.clone());
let human_router = human_router(state);