From c4c9412c3f459323f5acd91d4654d7ddae1526f0 Mon Sep 17 00:00:00 2001 From: Ben Morrison Date: Tue, 16 Jun 2020 19:00:08 -0400 Subject: recording hash of posts file in homedir sha256. This will facilitate checking for new posts on login. --- src/posts.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/posts.rs') diff --git a/src/posts.rs b/src/posts.rs index c44e0f5..0de3d52 100644 --- a/src/posts.rs +++ b/src/posts.rs @@ -83,6 +83,7 @@ pub fn display() -> error::Result<()> { .unwrap_or_else(|_| 80); let all = db::Posts::get_all(db::PATH); + all.hash()?; let mut postvec = Vec::new(); all.posts().iter().enumerate().for_each(|(id, post)| { @@ -90,7 +91,6 @@ pub fn display() -> error::Result<()> { .body .trim() .chars() - .into_iter() .enumerate() .map(|(i, e)| { let i = i + 1; -- cgit 1.4.1-2-gfad0