From 6d4df36c3c88bfa8bbf689a5a21888eba973beb5 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Thu, 19 Sep 2019 13:17:23 +0200 Subject: [PATCH] make download_chunk_list() public --- src/client/http_client.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/client/http_client.rs b/src/client/http_client.rs index 008bf579..622ca6c3 100644 --- a/src/client/http_client.rs +++ b/src/client/http_client.rs @@ -710,7 +710,7 @@ impl BackupClient { let index_path = format!("{}_index", prefix); let close_path = format!("{}_close", prefix); - Self::download_chunk_list(self.h2.clone(), &index_path, archive_name, known_chunks.clone()).await?; + self.download_chunk_list(&index_path, archive_name, known_chunks.clone()).await?; let wid = self.h2.post(&index_path, Some(param)).await?.as_u64().unwrap(); @@ -830,8 +830,8 @@ impl BackupClient { (verify_queue_tx, verify_result_rx) } - async fn download_chunk_list( - h2: H2Client, + pub async fn download_chunk_list( + &self, path: &str, archive_name: &str, known_chunks: Arc>>, @@ -840,7 +840,7 @@ impl BackupClient { let param = json!({ "archive-name": archive_name }); let request = H2Client::request_builder("localhost", "GET", path, Some(param)).unwrap(); - let h2request = h2.send_request(request, None).await?; + let h2request = self.h2.send_request(request, None).await?; let resp = h2request.await?; let status = resp.status();