diff --git a/archive-http/src/main.rs b/archive-http/src/main.rs index 9e8ae59..181856d 100644 --- a/archive-http/src/main.rs +++ b/archive-http/src/main.rs @@ -27,13 +27,12 @@ pub use mailpot::*; use askama::Template; use percent_encoding::percent_decode_str; -use warp::reject; #[derive(Template)] #[template(path = "list.html")] struct ListTemplate<'a> { title: &'a str, - list: &'a DbVal, + _list: &'a DbVal, posts: Vec>, body: &'a str, } @@ -42,14 +41,14 @@ struct ListTemplate<'a> { #[template(path = "post.html")] struct PostTemplate<'a> { title: &'a str, - list: &'a DbVal, - post: DbVal, + _list: &'a DbVal, + _post: DbVal, body: &'a str, - from: &'a str, - to: &'a str, + _from: &'a str, + _to: &'a str, subject: &'a str, - in_reply_to: Option, - references: Vec, + _in_reply_to: Option, + _references: Vec, } use warp::Filter; @@ -61,7 +60,7 @@ async fn main() { let posts = db.list_posts(list_pk, None).unwrap(); let template = ListTemplate { title: &list.name, - list: &list, + _list: &list, posts, body: &list.description.clone().unwrap_or_default(), }; @@ -84,14 +83,14 @@ async fn main() { let body_text = body.text(); let template = PostTemplate { title: &list.name, - list: &list, - post, + _list: &list, + _post: post, body: &body_text, - from: &envelope.field_from_to_string(), - to: &envelope.field_to_to_string(), + _from: &envelope.field_from_to_string(), + _to: &envelope.field_to_to_string(), subject: &envelope.subject(), - in_reply_to: envelope.in_reply_to_display().map(|r| r.to_string()), - references: envelope + _in_reply_to: envelope.in_reply_to_display().map(|r| r.to_string()), + _references: envelope .references() .into_iter() .map(|m| m.to_string()) diff --git a/core/src/db.rs b/core/src/db.rs index d754e69..a0d8693 100644 --- a/core/src/db.rs +++ b/core/src/db.rs @@ -155,7 +155,7 @@ impl Database { pub fn list_posts( &self, list_pk: i64, - date_range: Option<(String, String)>, + _date_range: Option<(String, String)>, ) -> Result>> { let mut stmt = self .connection