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()); } } }