diff options
author | Alexander Batischev <eual.jp@gmail.com> | 2021-07-21 21:26:05 +0300 |
---|---|---|
committer | Alexander Batischev <eual.jp@gmail.com> | 2021-07-21 22:25:47 +0300 |
commit | 24a3284979e41405e213f031ccfcca3f6f1513eb (patch) | |
tree | 240ae29c62be7a4bf2abdb53c1b0fc2214514216 /src/generation.rs | |
parent | 90e8f2dbf2f87a6a8fef8d44801642d9c644050f (diff) | |
download | obnam2-24a3284979e41405e213f031ccfcca3f6f1513eb.tar.gz |
backup_run: replace tuple with a struct
Diffstat (limited to 'src/generation.rs')
-rw-r--r-- | src/generation.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/generation.rs b/src/generation.rs index f4e4f53..893d23b 100644 --- a/src/generation.rs +++ b/src/generation.rs @@ -1,5 +1,5 @@ use crate::backup_reason::Reason; -use crate::backup_run::BackupError; +use crate::backup_run::{BackupError, FsEntryBackupOutcome}; use crate::chunkid::ChunkId; use crate::fsentry::FilesystemEntry; use log::debug; @@ -67,7 +67,7 @@ impl NascentGeneration { pub fn insert_iter( &mut self, - entries: impl Iterator<Item = Result<(FilesystemEntry, Vec<ChunkId>, Reason), BackupError>>, + entries: impl Iterator<Item = Result<FsEntryBackupOutcome, BackupError>>, ) -> NascentResult<Vec<BackupError>> { let t = self.conn.transaction().map_err(NascentError::Transaction)?; let mut warnings = vec![]; @@ -77,9 +77,9 @@ impl NascentGeneration { debug!("ignoring backup error {}", err); warnings.push(err); } - Ok((e, ids, reason)) => { + Ok(FsEntryBackupOutcome { entry, ids, reason }) => { self.fileno += 1; - sql::insert_one(&t, e, self.fileno, &ids[..], reason)?; + sql::insert_one(&t, entry, self.fileno, &ids[..], reason)?; } } } |