diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-08-01 20:50:58 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-08-01 20:55:04 +0300 |
commit | 1962cdaebc71bec28861635784e0b41deac98060 (patch) | |
tree | b25ed37fcfb2f8805a5b298b5ba09b80922a3c11 /src/client.rs | |
parent | 2bc07b176bcf63f94bf6f1cca0ade2505958a15d (diff) | |
download | obnam2-1962cdaebc71bec28861635784e0b41deac98060.tar.gz |
refactor: use a struct for GenId
This means a ChunkId can't be used instead.
Sponsored-by: author
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client.rs b/src/client.rs index b866471..c655bb2 100644 --- a/src/client.rs +++ b/src/client.rs @@ -102,7 +102,7 @@ impl AsyncBackupClient { } async fn fetch_generation_chunk(&self, gen_id: &GenId) -> Result<GenerationChunk, ClientError> { - let chunk = self.fetch_chunk(gen_id).await?; + let chunk = self.fetch_chunk(gen_id.as_chunk_id()).await?; let gen = GenerationChunk::from_data_chunk(&chunk)?; Ok(gen) } @@ -323,7 +323,7 @@ impl BackupClient { } fn fetch_generation_chunk(&self, gen_id: &GenId) -> Result<GenerationChunk, ClientError> { - let chunk = self.fetch_chunk(gen_id)?; + let chunk = self.fetch_chunk(gen_id.as_chunk_id())?; let gen = GenerationChunk::from_data_chunk(&chunk)?; Ok(gen) } |