From feb247b976dec952275dc3138d984cd81fca0efa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Gr=C3=BCnewald?= Date: Mon, 1 Jan 2024 21:50:57 +0100 Subject: [PATCH] Use String instead of Vec for post query --- src/client.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/client.rs b/src/client.rs index 94c2acd..6d55299 100644 --- a/src/client.rs +++ b/src/client.rs @@ -41,7 +41,7 @@ impl<'a> Client<'a> { async fn list_posts_raw( &mut self, limit: Option, - tags: Option>, + tags: Option, page: Option, ) -> Result { let mut url = url::Url::parse(format!("{}/posts.json", self.host).as_str())?; @@ -56,8 +56,8 @@ impl<'a> Client<'a> { } if let Some(tags) = tags { - if tags.len() > 0 { - query_params.push(format!("tags={}", tags.join(","))); + if !tags.is_empty() { + query_params.push(format!("tags={tags}")); } }