diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-01-16 17:15:52 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-01-19 11:24:17 +0200 |
commit | d2f0fba9465c998d1416f985771c7c19292cc020 (patch) | |
tree | fbb8b1361f826429809d2071fe28192c2b8bbf4a /src/backup_run.rs | |
parent | 579bacedf245a258c25c87d5da096816b2855b63 (diff) | |
download | obnam2-d2f0fba9465c998d1416f985771c7c19292cc020.tar.gz |
refactor: rename AsyncBackupClient to just BackupClient
There is only async.
Sponsored-by: author
Diffstat (limited to 'src/backup_run.rs')
-rw-r--r-- | src/backup_run.rs | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/backup_run.rs b/src/backup_run.rs index ade5ee0..2286fca 100644 --- a/src/backup_run.rs +++ b/src/backup_run.rs @@ -5,7 +5,7 @@ use crate::backup_reason::Reason; use crate::chunk::{GenerationChunk, GenerationChunkError}; use crate::chunker::{Chunker, ChunkerError}; use crate::chunkid::ChunkId; -use crate::client::{AsyncBackupClient, ClientError}; +use crate::client::{BackupClient, ClientError}; use crate::config::ClientConfig; use crate::error::ObnamError; use crate::fsentry::{FilesystemEntry, FilesystemKind}; @@ -24,7 +24,7 @@ const SQLITE_CHUNK_SIZE: usize = MIB as usize; /// A running backup. pub struct BackupRun<'a> { - client: &'a AsyncBackupClient, + client: &'a BackupClient, policy: BackupPolicy, buffer_size: usize, progress: Option<BackupProgress>, @@ -95,10 +95,7 @@ pub struct RootsBackupOutcome { impl<'a> BackupRun<'a> { /// Create a new run for an initial backup. - pub fn initial( - config: &ClientConfig, - client: &'a AsyncBackupClient, - ) -> Result<Self, BackupError> { + pub fn initial(config: &ClientConfig, client: &'a BackupClient) -> Result<Self, BackupError> { Ok(Self { client, policy: BackupPolicy::default(), @@ -110,7 +107,7 @@ impl<'a> BackupRun<'a> { /// Create a new run for an incremental backup. pub fn incremental( config: &ClientConfig, - client: &'a AsyncBackupClient, + client: &'a BackupClient, ) -> Result<Self, BackupError> { Ok(Self { client, |