about summary refs log tree commit diff stats
path: root/src/posts.rs
diff options
context:
space:
mode:
authorBen Morrison <ben@gbmor.dev>2020-06-16 19:00:08 -0400
committerBen Morrison <ben@gbmor.dev>2020-06-16 19:00:08 -0400
commitc4c9412c3f459323f5acd91d4654d7ddae1526f0 (patch)
treeadc72eadab449929e597f0a681b2c96bd4022df2 /src/posts.rs
parentd033f0d23934b2d578ca9ef5aaf6ba1cf51aef00 (diff)
downloadclinte-c4c9412c3f459323f5acd91d4654d7ddae1526f0.tar.gz
recording hash of posts file in homedir
sha256.
This will facilitate checking for new posts on login.
Diffstat (limited to 'src/posts.rs')
-rw-r--r--src/posts.rs2
1 files changed, 1 insertions, 1 deletions
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;