diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-09-09 07:01:47 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-09-09 07:01:47 +0000 |
commit | 1baa17c93e6cccd6194592076210625364058615 (patch) | |
tree | a0f7c194bf97530bd5103229309f7ec554c8ec6f /src/policy.rs | |
parent | 02d6e2e7d8c8b7854a2289f57a9039598b1430fa (diff) | |
parent | f2740c77c3e3d234b724704482e7b0380c2550d4 (diff) | |
download | obnam2-1baa17c93e6cccd6194592076210625364058615.tar.gz |
Merge branch 'fixes' into 'main'
fix things so ./chec k passes for me again
See merge request obnam/obnam!237
Diffstat (limited to 'src/policy.rs')
-rw-r--r-- | src/policy.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/policy.rs b/src/policy.rs index bb98a48..b3ba24c 100644 --- a/src/policy.rs +++ b/src/policy.rs @@ -32,7 +32,7 @@ impl BackupPolicy { /// Does a given file need to be backed up? pub fn needs_backup(&self, old: &LocalGeneration, new_entry: &FilesystemEntry) -> Reason { let new_name = new_entry.pathbuf(); - let reason = match old.get_file(&new_name) { + match old.get_file(&new_name) { Ok(None) => { if self.new { Reason::IsNew @@ -58,8 +58,7 @@ impl BackupPolicy { ); Reason::GenerationLookupError } - }; - reason + } } } |