1
0
Fork 0

cleanup unused variable

pull/1/head
Zynh0722 2023-07-31 07:38:55 -07:00
parent 6e332d4b3c
commit 6ad91ff7e5
1 changed files with 1 additions and 2 deletions

View File

@ -26,8 +26,7 @@ impl UploadRecord {
} }
pub fn can_be_downloaded(&self) -> bool { pub fn can_be_downloaded(&self) -> bool {
let now = Utc::now(); let dur_since_upload = Utc::now().signed_duration_since(self.uploaded);
let dur_since_upload = now.signed_duration_since(self.uploaded);
dur_since_upload < Duration::days(3) && self.downloads < self.max_downloads dur_since_upload < Duration::days(3) && self.downloads < self.max_downloads
} }