From 50b84a0025abdf94a4abd5d60fcac93fc511b43f Mon Sep 17 00:00:00 2001 From: Adrian Hedqvist Date: Thu, 30 Mar 2023 00:06:01 +0200 Subject: [PATCH] don't filter away posts when getting tags --- src/tag.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tag.rs b/src/tag.rs index a5c711e..acd4111 100644 --- a/src/tag.rs +++ b/src/tag.rs @@ -14,7 +14,7 @@ pub struct Tag { pub fn get_tags<'a>(posts: impl IntoIterator) -> HashMap { let mut tags: HashMap = HashMap::new(); - for post in posts.into_iter().filter(|p| p.is_published()) { + for post in posts.into_iter() { for key in &post.tags { if let Some(tag) = tags.get_mut(key) { tag.posts.push(post.slug.clone());