summaryrefslogtreecommitdiff
path: root/src/policy.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2022-09-09 09:11:44 +0300
committerLars Wirzenius <liw@liw.fi>2022-09-09 09:11:44 +0300
commit307abfa167cd898f112472bc33a13b17a326c676 (patch)
treeedcc62b1e2fcbd294f5e09e4fbf47c845eb519dd /src/policy.rs
parent02d6e2e7d8c8b7854a2289f57a9039598b1430fa (diff)
downloadobnam2-307abfa167cd898f112472bc33a13b17a326c676.tar.gz
chore: tidy up things to satisfy clippy
Sponsored-by: author
Diffstat (limited to 'src/policy.rs')
-rw-r--r--src/policy.rs5
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
+ }
}
}