|
72 | 72 |
|
73 | 73 | use crate::{ |
74 | 74 | body::{boxed, Body, Bytes, HttpBody}, |
75 | | - extract::{ |
76 | | - connect_info::{Connected, IntoMakeServiceWithConnectInfo}, |
77 | | - FromRequest, RequestParts, |
78 | | - }, |
| 75 | + extract::{connect_info::IntoMakeServiceWithConnectInfo, FromRequest, RequestParts}, |
79 | 76 | response::{IntoResponse, Response}, |
80 | 77 | routing::IntoMakeService, |
81 | 78 | BoxError, |
@@ -230,20 +227,17 @@ pub trait Handler<T, B = Body>: Clone + Send + Sized + 'static { |
230 | 227 | /// |
231 | 228 | /// # async { |
232 | 229 | /// Server::bind(&SocketAddr::from(([127, 0, 0, 1], 3000))) |
233 | | - /// .serve(handler.into_make_service_with_connect_info::<SocketAddr, _>()) |
| 230 | + /// .serve(handler.into_make_service_with_connect_info::<SocketAddr>()) |
234 | 231 | /// .await?; |
235 | 232 | /// # Ok::<_, hyper::Error>(()) |
236 | 233 | /// # }; |
237 | 234 | /// ``` |
238 | 235 | /// |
239 | 236 | /// [`MakeService`]: tower::make::MakeService |
240 | 237 | /// [`Router::into_make_service_with_connect_info`]: crate::routing::Router::into_make_service_with_connect_info |
241 | | - fn into_make_service_with_connect_info<C, Target>( |
| 238 | + fn into_make_service_with_connect_info<C>( |
242 | 239 | self, |
243 | | - ) -> IntoMakeServiceWithConnectInfo<IntoService<Self, T, B>, C> |
244 | | - where |
245 | | - C: Connected<Target>, |
246 | | - { |
| 240 | + ) -> IntoMakeServiceWithConnectInfo<IntoService<Self, T, B>, C> { |
247 | 241 | IntoMakeServiceWithConnectInfo::new(self.into_service()) |
248 | 242 | } |
249 | 243 | } |
|
0 commit comments