@@ -62,16 +62,16 @@ async fn bind_app(app: Router) -> (u16, impl std::future::Future<Output = ()>) {
6262
6363fn client ( proxy_port : u16 ) -> reqwest:: Client {
6464 reqwest:: Client :: builder ( )
65- . proxy ( reqwest:: Proxy :: http ( format ! ( "http://127.0.0.1:{}" , proxy_port ) ) . unwrap ( ) )
66- . proxy ( reqwest:: Proxy :: https ( format ! ( "http://127.0.0.1:{}" , proxy_port ) ) . unwrap ( ) )
65+ . proxy ( reqwest:: Proxy :: http ( format ! ( "http://127.0.0.1:{proxy_port}" ) ) . unwrap ( ) )
66+ . proxy ( reqwest:: Proxy :: https ( format ! ( "http://127.0.0.1:{proxy_port}" ) ) . unwrap ( ) )
6767 . build ( )
6868 . unwrap ( )
6969}
7070
7171fn client_tls ( proxy_port : u16 , cert : & rcgen:: Certificate ) -> reqwest:: Client {
7272 reqwest:: Client :: builder ( )
73- . proxy ( reqwest:: Proxy :: http ( format ! ( "http://127.0.0.1:{}" , proxy_port ) ) . unwrap ( ) )
74- . proxy ( reqwest:: Proxy :: https ( format ! ( "http://127.0.0.1:{}" , proxy_port ) ) . unwrap ( ) )
73+ . proxy ( reqwest:: Proxy :: http ( format ! ( "http://127.0.0.1:{proxy_port}" ) ) . unwrap ( ) )
74+ . proxy ( reqwest:: Proxy :: https ( format ! ( "http://127.0.0.1:{proxy_port}" ) ) . unwrap ( ) )
7575 . add_root_certificate ( reqwest:: Certificate :: from_der ( cert. der ( ) ) . unwrap ( ) )
7676 . build ( )
7777 . unwrap ( )
@@ -145,7 +145,7 @@ async fn test_simple_http() {
145145 let client = client ( proxy_port) ;
146146
147147 let res = client
148- . get ( format ! ( "http://127.0.0.1:{}/" , port ) )
148+ . get ( format ! ( "http://127.0.0.1:{port }/" ) )
149149 . send ( )
150150 . await
151151 . unwrap ( ) ;
@@ -184,7 +184,7 @@ async fn test_modify_http() {
184184 let client = client ( proxy_port) ;
185185
186186 let res = client
187- . get ( format ! ( "http://127.0.0.1:{}/" , port ) )
187+ . get ( format ! ( "http://127.0.0.1:{port }/" ) )
188188 . send ( )
189189 . await
190190 . unwrap ( ) ;
@@ -216,7 +216,7 @@ async fn test_sse_http() {
216216
217217 let client = client ( proxy_port) ;
218218 let res = client
219- . get ( format ! ( "http://127.0.0.1:{}/sse" , port ) )
219+ . get ( format ! ( "http://127.0.0.1:{port }/sse" ) )
220220 . send ( )
221221 . await
222222 . unwrap ( ) ;
@@ -273,7 +273,7 @@ async fn test_simple_https() {
273273 let client = client_tls ( proxy_port, & cert) ;
274274
275275 let res = client
276- . get ( format ! ( "https://127.0.0.1:{}/" , port ) )
276+ . get ( format ! ( "https://127.0.0.1:{port }/" ) )
277277 . send ( )
278278 . await
279279 . unwrap ( ) ;
0 commit comments