summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-05-12 21:41:49 +0300
committerLars Wirzenius <liw@liw.fi>2022-10-26 17:19:55 +0300
commit68ed0be9153a923185cebfc7fd88ee5aff012db8 (patch)
tree0c2825c798fecbad31afa67ded4b490a5fa763b1
parent69f2b3d9495cb4e8cff8eff4a49ac944dafee1ad (diff)
downloadobnam2-68ed0be9153a923185cebfc7fd88ee5aff012db8.tar.gz
use new chnunk store for backup client fetch_chunk
Sponsored-by: author
-rw-r--r--src/client.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/client.rs b/src/client.rs
index 6b89991..21e7cdb 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -214,9 +214,7 @@ impl BackupClient {
/// Fetch a data chunk from the server, given the chunk identifier.
pub async fn fetch_chunk(&self, chunk_id: &ChunkId) -> Result<DataChunk, ClientError> {
- let (headers, body) = self.get(&format!("/{}", chunk_id), &[]).await?;
- let meta = self.get_chunk_meta_header(chunk_id, &headers)?;
-
+ let (body, meta) = self.store.get(chunk_id).await?;
let meta_bytes = meta.to_json_vec();
let chunk = self.cipher.decrypt_chunk(&body, &meta_bytes)?;