From d1bfe2eb0ba8836d4eef4ca5dd6e20611dc3a8c0 Mon Sep 17 00:00:00 2001 From: cel 🌸 Date: Wed, 31 Jan 2024 18:55:36 +0000 Subject: changed Post tags() to return a Vec<&str> --- src/blog.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/blog.rs') 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 { - &self.tags + fn tags(&self) -> Vec<&str> { + self.tags.iter().map(|s| &**s).collect() } fn lang(&self) -> &str { -- cgit