From d3a1860a2de103dfb9be524ebd238ad5cea89efc Mon Sep 17 00:00:00 2001 From: Delta1925 Date: Thu, 13 Apr 2023 23:51:09 +0200 Subject: [PATCH] Fix typo --- src/main.rs | 2 +- src/management.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 8d22a5d..e621786 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,7 +66,7 @@ async fn submit(pem: web::Form) -> Result { #[get("/api/confirm/{value}")] async fn confirm(token: web::Path) -> Result { confirm_action(&token.value)?; - Ok(String::from("Confirmation successfull!")) + Ok(String::from("Confirmation successful!")) } #[get("/api/delete/{address}")] diff --git a/src/management.rs b/src/management.rs index e3a9b86..4fdc292 100644 --- a/src/management.rs +++ b/src/management.rs @@ -84,10 +84,10 @@ pub fn clean_stale(max_age: i64) -> Result<(), Error> { }; let now = Utc::now().timestamp(); if now - key.timestamp() > max_age { - if fs::remove_file(&file_path).is_err() { + let err = fs::remove_file(&file_path).is_err(); + if err { return Err(Error::Inaccessible); } - println!("Deleted {}, since it was stale", &file_path.display()); } } }