From 307abfa167cd898f112472bc33a13b17a326c676 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Fri, 9 Sep 2022 09:11:44 +0300 Subject: chore: tidy up things to satisfy clippy Sponsored-by: author --- src/policy.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/policy.rs') 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 + } } } -- cgit v1.2.1