From fde0ecb0505eb0a561be1c134f7964f88066c874 Mon Sep 17 00:00:00 2001 From: Rowan Lewis Date: Tue, 13 Mar 2018 23:44:08 +0100 Subject: [PATCH] Avoid setting the expiry to mutable. --- hammond-data/src/utils.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hammond-data/src/utils.rs b/hammond-data/src/utils.rs index f7c26ae..f3591da 100644 --- a/hammond-data/src/utils.rs +++ b/hammond-data/src/utils.rs @@ -39,9 +39,7 @@ fn download_checker() -> Result<(), DataError> { } fn delete_expired_played_episodes() -> Result<(), DataError> { - let expiry = Utc::now().timestamp() as i32; - - expiry -= 172_800; + let expiry = Utc::now().timestamp() as i32 - 172_800; delete_played_episodes(|ep| ep.played().is_some() && ep.played().unwrap() > expiry) }