From dd5b0b12ece885659d395bb493aa76240305bf08 Mon Sep 17 00:00:00 2001 From: Christine Dodrill Date: Mon, 15 Feb 2021 16:33:14 -0500 Subject: [PATCH] post: remove body field, it was not used Signed-off-by: Christine Dodrill --- src/post/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/post/mod.rs b/src/post/mod.rs index 599d9a8..edbb89c 100644 --- a/src/post/mod.rs +++ b/src/post/mod.rs @@ -10,7 +10,6 @@ pub mod frontmatter; pub struct Post { pub front_matter: frontmatter::Data, pub link: String, - pub body: String, pub body_html: String, pub date: DateTime, pub mentions: Vec, @@ -83,7 +82,6 @@ async fn read_post(dir: &str, fname: PathBuf) -> Result { let link = format!("{}/{}", dir, fname.file_stem().unwrap().to_str().unwrap()); let body_html = crate::app::markdown::render(&body) .wrap_err_with(|| format!("can't parse markdown for {:?}", fname))?; - let body = body.to_string(); let date: DateTime = DateTime::::from_utc(NaiveDateTime::new(date, NaiveTime::from_hms(0, 0, 0)), Utc) .with_timezone(&Utc) @@ -101,7 +99,6 @@ async fn read_post(dir: &str, fname: PathBuf) -> Result { Ok(Post { front_matter, link, - body, body_html, date, mentions,