@@ -6,7 +6,7 @@ impl ServerHook for JsonRoute {
66 }
77
88 async fn handle ( self , ctx : & Context ) {
9- let request_config: RequestConfig = * REQUEST_CONFIG ;
9+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
1010 let json: Value = json ! ( {
1111 KEY_MESSAGE : RESPONSEDATA_STR
1212 } ) ;
@@ -16,7 +16,7 @@ impl ServerHook for JsonRoute {
1616 ctx. send ( ) . await ;
1717 } ;
1818 run ( ) . await ;
19- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
19+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
2020 run ( ) . await ;
2121 }
2222 ctx. closed ( ) . await ;
@@ -29,14 +29,14 @@ impl ServerHook for PlaintextRoute {
2929 }
3030
3131 async fn handle ( self , ctx : & Context ) {
32- let request_config: RequestConfig = * REQUEST_CONFIG ;
32+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
3333 ctx. set_response_header ( CONTENT_TYPE , TEXT_PLAIN ) . await ;
3434 ctx. set_response_body ( & RESPONSEDATA_BIN ) . await ;
3535 let run = || async {
3636 ctx. send ( ) . await ;
3737 } ;
3838 run ( ) . await ;
39- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
39+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
4040 run ( ) . await ;
4141 }
4242 ctx. closed ( ) . await ;
@@ -49,7 +49,7 @@ impl ServerHook for DbRoute {
4949 }
5050
5151 async fn handle ( self , ctx : & Context ) {
52- let request_config: RequestConfig = * REQUEST_CONFIG ;
52+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
5353 let db_connection: & DbPoolConnection = get_db_connection ( ) ;
5454 let run = || async {
5555 let query_row: QueryRow = random_world_row ( db_connection) . await ;
@@ -59,7 +59,7 @@ impl ServerHook for DbRoute {
5959 . await ;
6060 } ;
6161 run ( ) . await ;
62- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
62+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
6363 run ( ) . await ;
6464 }
6565 ctx. closed ( ) . await ;
@@ -72,7 +72,7 @@ impl ServerHook for QueryRoute {
7272 }
7373
7474 async fn handle ( self , ctx : & Context ) {
75- let request_config: RequestConfig = * REQUEST_CONFIG ;
75+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
7676 let run = || async {
7777 let queries: Queries = ctx
7878 . try_get_request_query ( QUERY_DB_QUERY_KEY )
@@ -89,7 +89,7 @@ impl ServerHook for QueryRoute {
8989 . await ;
9090 } ;
9191 run ( ) . await ;
92- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
92+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
9393 run ( ) . await ;
9494 }
9595 ctx. closed ( ) . await ;
@@ -102,7 +102,7 @@ impl ServerHook for FortunesRoute {
102102 }
103103
104104 async fn handle ( self , ctx : & Context ) {
105- let request_config: RequestConfig = * REQUEST_CONFIG ;
105+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
106106 ctx. set_response_header (
107107 CONTENT_TYPE ,
108108 & ContentType :: format_content_type_with_charset ( TEXT_HTML , UTF8 ) ,
@@ -126,7 +126,7 @@ impl ServerHook for FortunesRoute {
126126 ctx. set_response_body ( & res) . await . send ( ) . await ;
127127 } ;
128128 run ( ) . await ;
129- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
129+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
130130 run ( ) . await ;
131131 }
132132 ctx. closed ( ) . await ;
@@ -139,7 +139,7 @@ impl ServerHook for UpdateRoute {
139139 }
140140
141141 async fn handle ( self , ctx : & Context ) {
142- let request_config: RequestConfig = * REQUEST_CONFIG ;
142+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
143143 let run = || async {
144144 let queries: Queries = ctx
145145 . try_get_request_query ( UPDATE_DB_QUERY_KEY )
@@ -155,7 +155,7 @@ impl ServerHook for UpdateRoute {
155155 . await ;
156156 } ;
157157 run ( ) . await ;
158- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
158+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
159159 run ( ) . await ;
160160 }
161161 ctx. closed ( ) . await ;
@@ -168,7 +168,7 @@ impl ServerHook for CachedQueryRoute {
168168 }
169169
170170 async fn handle ( self , ctx : & Context ) {
171- let request_config: RequestConfig = * REQUEST_CONFIG ;
171+ let request_config: RequestConfigData = * REQUEST_CONFIG ;
172172 let run = || async {
173173 let count: Queries = ctx
174174 . try_get_request_query ( CACHE_QUERY_KEY )
@@ -184,7 +184,7 @@ impl ServerHook for CachedQueryRoute {
184184 . await ;
185185 } ;
186186 run ( ) . await ;
187- while ctx. http_from_stream ( request_config) . await . is_ok ( ) {
187+ while ctx. http_from_stream ( & request_config) . await . is_ok ( ) {
188188 run ( ) . await ;
189189 }
190190 ctx. closed ( ) . await ;
0 commit comments