From e3a17c1249e8c34c45c46fdf1be8f07c7d2c2e09 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Fri, 23 Sep 2022 21:10:08 +0200 Subject: [PATCH] Add #[track_caller] attribute to Router::into_[make_]service (#1407) --- axum/src/routing/mod.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/axum/src/routing/mod.rs b/axum/src/routing/mod.rs index 12cc507b..687c51c6 100644 --- a/axum/src/routing/mod.rs +++ b/axum/src/routing/mod.rs @@ -439,6 +439,7 @@ where } /// Convert this router into a [`RouterService`]. + #[track_caller] pub fn into_service(self) -> RouterService { RouterService::new(self) } @@ -466,6 +467,7 @@ where /// ``` /// /// [`MakeService`]: tower::make::MakeService + #[track_caller] pub fn into_make_service(self) -> IntoMakeService> { IntoMakeService::new(self.into_service()) }