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(()), } }