summaryrefslogtreecommitdiff
path: root/src/client.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-05-13 08:25:34 +0300
committerLars Wirzenius <liw@liw.fi>2022-10-26 17:19:55 +0300
commit5cc1dc560ff605a6d582ea0d94ed65b0295cf324 (patch)
treec2e8db6e43faa1361b66fb16f64463b3c823b7db /src/client.rs
parentc76569bbfdd3c40e427c99fa1a88158344cdfa67 (diff)
downloadobnam2-5cc1dc560ff605a6d582ea0d94ed65b0295cf324.tar.gz
change put to take a vector of bytes
Sponsored-by: author
Diffstat (limited to 'src/client.rs')
-rw-r--r--src/client.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client.rs b/src/client.rs
index 7b15bba..7ae6581 100644
--- a/src/client.rs
+++ b/src/client.rs
@@ -131,7 +131,8 @@ impl BackupClient {
/// Upload a data chunk to the server.
pub async fn upload_chunk(&mut self, chunk: DataChunk) -> Result<ChunkId, ClientError> {
let enc = self.cipher.encrypt_chunk(&chunk)?;
- let id = self.store.put(enc, chunk.meta()).await?;
+ let data = enc.ciphertext().to_vec();
+ let id = self.store.put(data, chunk.meta()).await?;
Ok(id)
}