From 6ad91ff7e5d59539c73bec9f23340756b9ebfc3b Mon Sep 17 00:00:00 2001 From: Zynh0722 Date: Mon, 31 Jul 2023 07:38:55 -0700 Subject: [PATCH] cleanup unused variable --- src/state.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/state.rs b/src/state.rs index 5cff331..96724da 100644 --- a/src/state.rs +++ b/src/state.rs @@ -26,8 +26,7 @@ impl UploadRecord { } pub fn can_be_downloaded(&self) -> bool { - let now = Utc::now(); - let dur_since_upload = now.signed_duration_since(self.uploaded); + let dur_since_upload = Utc::now().signed_duration_since(self.uploaded); dur_since_upload < Duration::days(3) && self.downloads < self.max_downloads }