diff options
author | Timo Kösters <timo@koesters.xyz> | 2022-04-06 21:31:29 +0200 |
---|---|---|
committer | Timo Kösters <timo@koesters.xyz> | 2022-04-07 12:58:48 +0200 |
commit | 2808dd2000f331c9ef90d152afefe7c04e3b1e92 (patch) | |
tree | b52ddb20bd88547247ebfe886324dae53b27a854 /src/main.rs | |
parent | 17ad5f0595c3b91683ef620aa8d3a400479136da (diff) | |
download | conduit-2808dd2000f331c9ef90d152afefe7c04e3b1e92.zip |
Ruma upgrade
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs index a9047ec..d20ee75 100644 --- a/src/main.rs +++ b/src/main.rs @@ -26,10 +26,7 @@ use http::{ Method, Uri, }; use opentelemetry::trace::{FutureExt, Tracer}; -use ruma::{ - api::{client::error::ErrorKind, IncomingRequest}, - Outgoing, -}; +use ruma::api::{client::error::ErrorKind, IncomingRequest}; use tokio::{signal, sync::RwLock}; use tower::ServiceBuilder; use tower_http::{ @@ -408,16 +405,15 @@ macro_rules! impl_ruma_handler { #[allow(non_snake_case)] impl<Req, E, F, Fut, $($ty,)*> RumaHandler<($($ty,)* Ruma<Req>,)> for F where - Req: Outgoing + 'static, - Req::Incoming: IncomingRequest + Send, + Req: IncomingRequest + Send + 'static, F: FnOnce($($ty,)* Ruma<Req>) -> Fut + Clone + Send + 'static, - Fut: Future<Output = Result<<Req::Incoming as IncomingRequest>::OutgoingResponse, E>> + Fut: Future<Output = Result<Req::OutgoingResponse, E>> + Send, E: IntoResponse, $( $ty: FromRequest<axum::body::Body> + Send + 'static, )* { fn add_to_router(self, mut router: Router) -> Router { - let meta = Req::Incoming::METADATA; + let meta = Req::METADATA; let method_filter = method_to_filter(meta.method); for path in IntoIterator::into_iter([meta.unstable_path, meta.r0_path, meta.stable_path]).flatten() { |