1- // It's not clear where this originates.
2- #![ allow( clippy:: redundant_closure_call) ]
3-
41use crate :: * ;
52use std:: error:: Error as _;
63use tokio:: sync:: mpsc;
@@ -345,7 +342,8 @@ macro_rules! http1_tests {
345342 let _trace = trace_init( ) ;
346343
347344 let srv = server:: http1( ) . route( "/" , "hello h1" ) . run( ) . await ;
348- let proxy = ( $proxy) ( srv) . await ;
345+ let mk = $proxy;
346+ let proxy = mk( srv) . await ;
349347 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
350348
351349 assert_eq!( client. get( "/" ) . await , "hello h1" ) ;
@@ -371,7 +369,8 @@ macro_rules! http1_tests {
371369 } )
372370 . run( )
373371 . await ;
374- let proxy = ( $proxy) ( srv) . await ;
372+ let mk = $proxy;
373+ let proxy = mk( srv) . await ;
375374 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
376375
377376 let res = client
@@ -415,7 +414,8 @@ macro_rules! http1_tests {
415414 } )
416415 . run( )
417416 . await ;
418- let proxy = ( $proxy) ( srv) . await ;
417+ let mk = $proxy;
418+ let proxy = mk( srv) . await ;
419419 let client = client:: http1( proxy. inbound, host) ;
420420
421421 let res = client
@@ -450,7 +450,8 @@ macro_rules! http1_tests {
450450 } )
451451 . run( )
452452 . await ;
453- let proxy = ( $proxy) ( srv) . await ;
453+ let mk = $proxy;
454+ let proxy = mk( srv) . await ;
454455 let client = client:: http1_absolute_uris( proxy. inbound, auth) ;
455456
456457 let res = client
@@ -520,7 +521,8 @@ macro_rules! http1_tests {
520521 } )
521522 . run( )
522523 . await ;
523- let proxy = ( $proxy) ( srv) . await ;
524+ let mk = $proxy;
525+ let proxy = mk( srv) . await ;
524526
525527 let client = client:: tcp( proxy. inbound) ;
526528
@@ -561,7 +563,8 @@ macro_rules! http1_tests {
561563 } )
562564 . run( )
563565 . await ;
564- let proxy = ( $proxy) ( srv) . await ;
566+ let mk = $proxy;
567+ let proxy = mk( srv) . await ;
565568
566569 let host = "transparency.test.svc.cluster.local" ;
567570 let client = client:: http1( proxy. inbound, host) ;
@@ -597,7 +600,8 @@ macro_rules! http1_tests {
597600 } )
598601 . run( )
599602 . await ;
600- let proxy = ( $proxy) ( srv) . await ;
603+ let mk = $proxy;
604+ let proxy = mk( srv) . await ;
601605
602606 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
603607
@@ -673,7 +677,8 @@ macro_rules! http1_tests {
673677 } )
674678 . run( )
675679 . await ;
676- let proxy = ( $proxy) ( srv) . await ;
680+ let mk = $proxy;
681+ let proxy = mk( srv) . await ;
677682
678683 let client = client:: tcp( proxy. inbound) ;
679684
@@ -712,7 +717,8 @@ macro_rules! http1_tests {
712717 } )
713718 . run( )
714719 . await ;
715- let proxy = ( $proxy) ( srv) . await ;
720+ let mk = $proxy;
721+ let proxy = mk( srv) . await ;
716722
717723 // A TCP client is used since the HTTP client would stop these requests
718724 // from ever touching the network.
@@ -781,7 +787,8 @@ macro_rules! http1_tests {
781787 } )
782788 . run( )
783789 . await ;
784- let proxy = ( $proxy) ( srv) . await ;
790+ let mk = $proxy;
791+ let proxy = mk( srv) . await ;
785792 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
786793
787794 let req = client
@@ -816,7 +823,8 @@ macro_rules! http1_tests {
816823 } )
817824 . run( )
818825 . await ;
819- let proxy = ( $proxy) ( srv) . await ;
826+ let mk = $proxy;
827+ let proxy = mk( srv) . await ;
820828 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
821829
822830 let req = client
@@ -854,7 +862,8 @@ macro_rules! http1_tests {
854862 } )
855863 . run( )
856864 . await ;
857- let proxy = ( $proxy) ( srv) . await ;
865+ let mk = $proxy;
866+ let proxy = mk( srv) . await ;
858867 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
859868
860869 let methods = & [ "GET" , "POST" , "PUT" , "DELETE" , "HEAD" , "PATCH" ] ;
@@ -891,7 +900,8 @@ macro_rules! http1_tests {
891900 } )
892901 . run( )
893902 . await ;
894- let proxy = ( $proxy) ( srv) . await ;
903+ let mk = $proxy;
904+ let proxy = mk( srv) . await ;
895905 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
896906
897907 let methods = & [ "GET" , "POST" , "PUT" , "DELETE" , "HEAD" , "PATCH" ] ;
@@ -935,7 +945,8 @@ macro_rules! http1_tests {
935945 } )
936946 . run( )
937947 . await ;
938- let proxy = ( $proxy) ( srv) . await ;
948+ let mk = $proxy;
949+ let proxy = mk( srv) . await ;
939950 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
940951
941952 // https://tools.ietf.org/html/rfc7230#section-3.3.3
@@ -998,7 +1009,8 @@ macro_rules! http1_tests {
9981009 } )
9991010 . run( )
10001011 . await ;
1001- let proxy = ( $proxy) ( srv) . await ;
1012+ let mk = $proxy;
1013+ let proxy = mk( srv) . await ;
10021014 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
10031015
10041016 let resp = client
@@ -1039,7 +1051,8 @@ macro_rules! http1_tests {
10391051 } )
10401052 . run( )
10411053 . await ;
1042- let proxy = ( $proxy) ( srv) . await ;
1054+ let mk = $proxy;
1055+ let proxy = mk( srv) . await ;
10431056
10441057 let client = client:: http1( proxy. inbound, "transparency.test.svc.cluster.local" ) ;
10451058
0 commit comments