@@ -104,9 +104,9 @@ impl SecretExt for MockSecretsClient {
104
104
}
105
105
106
106
#[ derive( Debug , Clone , Eq , PartialEq ) ]
107
- pub struct ApiResponse < T : DeserializeOwned = Value > {
107
+ pub struct ApiResponse < Data : DeserializeOwned = Value > {
108
108
pub code : StatusCode ,
109
- pub data : T ,
109
+ pub data : Data ,
110
110
}
111
111
112
112
impl TestServer {
@@ -268,13 +268,13 @@ impl TestServer {
268
268
}
269
269
}
270
270
271
- pub async fn send_request < T : Serialize , U : DeserializeOwned > (
271
+ pub async fn send_request < Payload : Serialize , Response : DeserializeOwned > (
272
272
& self ,
273
273
path : & str ,
274
274
method : http:: Method ,
275
275
key : Option < & str > ,
276
- payload : Option < & T > ,
277
- ) -> Result < ApiResponse < U > > {
276
+ payload : Option < & Payload > ,
277
+ ) -> Result < ApiResponse < Response > > {
278
278
self . send_request_with_auth_headers (
279
279
path,
280
280
method,
@@ -288,14 +288,14 @@ impl TestServer {
288
288
. await
289
289
}
290
290
291
- pub async fn send_request_with_headers < T : Serialize , U : DeserializeOwned > (
291
+ pub async fn send_request_with_headers < Payload : Serialize , Response : DeserializeOwned > (
292
292
& self ,
293
293
path : & str ,
294
294
method : http:: Method ,
295
295
key : Option < & str > ,
296
- payload : Option < & T > ,
296
+ payload : Option < & Payload > ,
297
297
headers : Option < BTreeMap < String , String > > ,
298
- ) -> Result < ApiResponse < U > > {
298
+ ) -> Result < ApiResponse < Response > > {
299
299
let mut req = self
300
300
. client
301
301
. request ( method, format ! ( "http://localhost:{}/{path}" , self . port) ) ;
@@ -319,14 +319,14 @@ impl TestServer {
319
319
} )
320
320
}
321
321
322
- async fn send_request_with_auth_headers < T : Serialize , U : DeserializeOwned > (
322
+ async fn send_request_with_auth_headers < Payload : Serialize , Response : DeserializeOwned > (
323
323
& self ,
324
324
path : & str ,
325
325
method : http:: Method ,
326
326
key : Option < & str > ,
327
- payload : Option < & T > ,
327
+ payload : Option < & Payload > ,
328
328
headers : Option < BTreeMap < String , String > > ,
329
- ) -> Result < ApiResponse < U > > {
329
+ ) -> Result < ApiResponse < Response > > {
330
330
let headers = match headers {
331
331
Some ( h) => h
332
332
. into_iter ( )
0 commit comments