diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-01-16 17:15:52 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-01-16 17:33:09 +0200 |
commit | 6ed7241df0accea0d06beefa6aa39543b3a138e3 (patch) | |
tree | 1ddb56e4a431421043bd72d38a895f2bd73f23ea /src/backup_run.rs | |
parent | 61ea591bd254a240bb8c45221dea057c1517b0ae (diff) | |
download | obnam2-6ed7241df0accea0d06beefa6aa39543b3a138e3.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, |