aboutsummaryrefslogtreecommitdiffstats
path: root/src/posts
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/posts
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/posts.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/posts.rs b/src/posts.rs
index a8e9f90..93c9179 100644
--- a/src/posts.rs
+++ b/src/posts.rs
@@ -14,7 +14,7 @@ pub trait Post {
fn subject(&self) -> Option<&str>;
fn published_at(&self) -> &DateTime<Utc>;
fn updated_at(&self) -> Option<&DateTime<Utc>>;
- fn tags(&self) -> &Vec<String>;
+ fn tags(&self) -> Vec<&str>;
fn lang(&self) -> &str;
fn post_type(&self) -> PostType;
fn content(&self) -> &str;
@@ -23,7 +23,7 @@ pub trait Post {
"https://en.blos.sm/posts/".to_owned() + self.id()
}
- fn get_tags<'a>(posts: &'a Vec<Self>) -> Vec<&'a String>
+ fn get_tags<'a>(posts: &'a Vec<Self>) -> Vec<&'a str>
where
Self: Sized,
{