From ce8ea56f3b12e6f2eb648d496b27346c8bc7f697 Mon Sep 17 00:00:00 2001 From: Jonas Platte Date: Sat, 19 Nov 2022 22:26:12 +0100 Subject: [PATCH] Small improvements to RouterService (#1548) * Fix docstrings on RouterService methods * Simplify signatures of RouterService methods with Self type --- axum/src/routing/service.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/axum/src/routing/service.rs b/axum/src/routing/service.rs index f3ba1f9e..141bd442 100644 --- a/axum/src/routing/service.rs +++ b/axum/src/routing/service.rs @@ -76,17 +76,17 @@ where route.call(req) } - /// Convert the router into a [`MakeService`] and no state. + /// Convert the `RouterService` into a [`MakeService`]. /// /// See [`Router::into_make_service`] for more details. /// /// [`MakeService`]: tower::make::MakeService - pub fn into_make_service(self) -> IntoMakeService> { + pub fn into_make_service(self) -> IntoMakeService { IntoMakeService::new(self) } - /// Convert the router into a [`MakeService`] which stores information - /// about the incoming connection and has no state. + /// Convert the `RouterService` into a [`MakeService`] which stores information + /// about the incoming connection. /// /// See [`Router::into_make_service_with_connect_info`] for more details. /// @@ -94,7 +94,7 @@ where #[cfg(feature = "tokio")] pub fn into_make_service_with_connect_info( self, - ) -> crate::extract::connect_info::IntoMakeServiceWithConnectInfo, C> { + ) -> crate::extract::connect_info::IntoMakeServiceWithConnectInfo { crate::extract::connect_info::IntoMakeServiceWithConnectInfo::new(self) } }