aboutsummaryrefslogtreecommitdiffstats
path: root/src/blog.rs
diff options
context:
space:
mode:
authorLibravatar cel 🌸 <cel@blos.sm>2024-01-31 18:55:36 +0000
committerLibravatar cel 🌸 <cel@blos.sm>2024-01-31 18:55:36 +0000
commitd1bfe2eb0ba8836d4eef4ca5dd6e20611dc3a8c0 (patch)
treec54999785bf7ae865ca571a475da222e9e376873 /src/blog.rs
parentb78d026c242e8d95e611e050afd5b72eb562d56d (diff)
downloadblossom-d1bfe2eb0ba8836d4eef4ca5dd6e20611dc3a8c0.tar.gz
blossom-d1bfe2eb0ba8836d4eef4ca5dd6e20611dc3a8c0.tar.bz2
blossom-d1bfe2eb0ba8836d4eef4ca5dd6e20611dc3a8c0.zip
changed Post tags() to return a Vec<&str>
Diffstat (limited to '')
-rw-r--r--src/blog.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/blog.rs b/src/blog.rs
index 0e757d5..b6ca75c 100644
--- a/src/blog.rs
+++ b/src/blog.rs
@@ -76,8 +76,8 @@ impl Post for Blogpost {
self.updated_at.as_ref()
}
- fn tags(&self) -> &Vec<String> {
- &self.tags
+ fn tags(&self) -> Vec<&str> {
+ self.tags.iter().map(|s| &**s).collect()
}
fn lang(&self) -> &str {