Add track_caller to route_with_tsr (#1390)

… and route_service_with_tsr.
This commit is contained in:
Jonas Platte 2022-09-18 23:12:08 +02:00 committed by GitHub
parent c93d7c324e
commit 4ade706ab0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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<S, B>) -> Self
where
Self: Sized,
@ -278,6 +279,7 @@ where
}
}
#[track_caller]
fn route_service_with_tsr<T>(mut self, path: &str, service: T) -> Self
where
T: Service<Request<B>, Error = Infallible> + Clone + Send + 'static,