From 4ade706ab01f1172710810ea64f803668b31fa78 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sun, 18 Sep 2022 23:12:08 +0200 Subject: [PATCH] Add track_caller to route_with_tsr (#1390) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit … and route_service_with_tsr. --- axum-extra/src/routing/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/axum-extra/src/routing/mod.rs b/axum-extra/src/routing/mod.rs index ad348292..d3a8e554 100644 --- a/axum-extra/src/routing/mod.rs +++ b/axum-extra/src/routing/mod.rs @@ -260,6 +260,7 @@ where self.route(P::PATH, axum::routing::trace(handler)) } + #[track_caller] fn route_with_tsr(mut self, path: &str, method_router: MethodRouter) -> Self where Self: Sized, @@ -278,6 +279,7 @@ where } } + #[track_caller] fn route_service_with_tsr(mut self, path: &str, service: T) -> Self where T: Service, Error = Infallible> + Clone + Send + 'static,