diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-01-05 12:13:01 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-01-05 12:13:01 +0000 |
commit | fee70c974049560164d8950dabc63554f55671b1 (patch) | |
tree | 7c2d38852e6f1eec5c357b2304a04dc332b8d953 /src/client.rs | |
parent | 678e65c57ae983ef66d16e92965814b0f3f0d73f (diff) | |
parent | 8a42fc1c9dc3da6936fe8e1d0d16fbe8a60ec520 (diff) | |
download | obnam2-fee70c974049560164d8950dabc63554f55671b1.tar.gz |
Merge branch 'policy' into 'main'
refactor: move policy on whether to back up a file into a module
Closes #38
See merge request larswirzenius/obnam!62
Diffstat (limited to 'src/client.rs')
-rw-r--r-- | src/client.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client.rs b/src/client.rs index 1b507d3..d075f43 100644 --- a/src/client.rs +++ b/src/client.rs @@ -64,16 +64,16 @@ impl BackupClient { pub fn upload_filesystem_entry( &self, - e: FilesystemEntry, + e: &FilesystemEntry, size: usize, - ) -> anyhow::Result<(FilesystemEntry, Vec<ChunkId>)> { + ) -> anyhow::Result<Vec<ChunkId>> { debug!("entry: {:?}", e); let ids = match e.kind() { FilesystemKind::Regular => self.read_file(e.pathbuf(), size)?, FilesystemKind::Directory => vec![], FilesystemKind::Symlink => vec![], }; - Ok((e, ids)) + Ok(ids) } pub fn upload_generation(&self, filename: &Path, size: usize) -> anyhow::Result<ChunkId> { |