@@ -161,19 +161,20 @@ pub trait ServiceBuilderExt<L>: sealed::Sealed<L> + Sized {
161161 > ;
162162
163163 /// Follow redirect responses using the [`Standard`] policy,
164- /// storing it as an extension
164+ /// storing it as an extension.
165165 ///
166- /// See [`tower_http::follow_redirect::extension `] for more details.
166+ /// See [`tower_http::follow_redirect`] for more details.
167167 ///
168- /// [`tower_http::follow_redirect::extension `]: crate::follow_redirect::extension
168+ /// [`tower_http::follow_redirect`]: crate::follow_redirect
169169 /// [`Standard`]: crate::follow_redirect::policy::Standard
170170 #[ cfg( feature = "follow-redirect" ) ]
171171 fn follow_redirects_extension (
172172 self ,
173173 ) -> ServiceBuilder <
174174 Stack <
175- crate :: follow_redirect:: extension :: FollowRedirectExtensionLayer <
175+ crate :: follow_redirect:: FollowRedirectLayer <
176176 crate :: follow_redirect:: policy:: Standard ,
177+ crate :: follow_redirect:: PolicyExtension ,
177178 > ,
178179 L ,
179180 > ,
@@ -483,13 +484,18 @@ impl<L> ServiceBuilderExt<L> for ServiceBuilder<L> {
483484 self ,
484485 ) -> ServiceBuilder <
485486 Stack <
486- crate :: follow_redirect:: extension :: FollowRedirectExtensionLayer <
487+ crate :: follow_redirect:: FollowRedirectLayer <
487488 crate :: follow_redirect:: policy:: Standard ,
489+ crate :: follow_redirect:: PolicyExtension ,
488490 > ,
489491 L ,
490492 > ,
491493 > {
492- self . layer ( crate :: follow_redirect:: extension:: FollowRedirectExtensionLayer :: new ( ) )
494+ self . layer (
495+ crate :: follow_redirect:: FollowRedirectLayer :: with_policy_extension (
496+ crate :: follow_redirect:: policy:: Standard :: default ( ) ,
497+ ) ,
498+ )
493499 }
494500
495501 #[ cfg( feature = "sensitive-headers" ) ]
0 commit comments