From b419bb24889dc98b7f8e476a23120129b1ebe419 Mon Sep 17 00:00:00 2001 From: tottoto Date: Tue, 21 May 2024 20:42:15 +0900 Subject: [PATCH] feat(router): Make Routes::prepare public --- tonic/src/service/router.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tonic/src/service/router.rs b/tonic/src/service/router.rs index 1aca4758b..49c203fc4 100644 --- a/tonic/src/service/router.rs +++ b/tonic/src/service/router.rs @@ -83,11 +83,11 @@ impl Routes { self } - #[cfg(feature = "transport")] - pub(crate) fn prepare(self) -> Self { + /// This makes axum perform update some internals of the router that improves perf. + /// + /// See + pub fn prepare(self) -> Self { Self { - // this makes axum perform update some internals of the router that improves perf - // see https://docs.rs/axum/latest/axum/routing/struct.Router.html#a-note-about-performance router: self.router.with_state(()), } }