Refactor: gh_api_client::test::create_client shall not be async

as there is no `.await` in it.

Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
Jiahao XU 2024-05-30 01:00:23 +10:00
parent 9f3156cea5
commit eb77ad762b
No known key found for this signature in database
GPG key ID: 76D1E687CA3C4928

View file

@ -416,7 +416,7 @@ mod test {
/// Mark this as an async fn so that you won't accidentally use it in /// Mark this as an async fn so that you won't accidentally use it in
/// sync context. /// sync context.
async fn create_client() -> Vec<GhApiClient> { fn create_client() -> Vec<GhApiClient> {
let client = create_remote_client(); let client = create_remote_client();
let mut gh_clients = vec![GhApiClient::new(client.clone(), None)]; let mut gh_clients = vec![GhApiClient::new(client.clone(), None)];
@ -447,7 +447,7 @@ mod test {
let mut tests: Vec<(_, _)> = Vec::new(); let mut tests: Vec<(_, _)> = Vec::new();
for client in create_client().await { for client in create_client() {
for repo in PUBLIC_REPOS { for repo in PUBLIC_REPOS {
let client = client.clone(); let client = client.clone();
@ -509,7 +509,7 @@ mod test {
let mut tasks = Vec::new(); let mut tasks = Vec::new();
for client in create_client().await { for client in create_client() {
for (release, artifacts) in RELEASES { for (release, artifacts) in RELEASES {
for artifact_name in artifacts { for artifact_name in artifacts {
let client = client.clone(); let client = client.clone();