From 000e81694c1bdaebf9eff77ec383f0e0603870ea Mon Sep 17 00:00:00 2001 From: Ezri Zhu Date: Tue, 21 May 2024 10:28:29 -0400 Subject: [PATCH] remove clone on ref --- src/feed/news_atom.rs | 2 +- src/feed/news_rss.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/feed/news_atom.rs b/src/feed/news_atom.rs index 6974c81..2320934 100644 --- a/src/feed/news_atom.rs +++ b/src/feed/news_atom.rs @@ -72,7 +72,7 @@ pub async fn get(State(state): State) -> Response { news.remove(0); let (date_str, title) = news.split_once(": ").unwrap(); - let content = title.clone(); + let content = title; // link (id), has to be unique let link = format!("{}#{}", "https://ezrizhu.com/news", (news_len - count).to_string()); count+=1; diff --git a/src/feed/news_rss.rs b/src/feed/news_rss.rs index fd7b711..3bf6634 100644 --- a/src/feed/news_rss.rs +++ b/src/feed/news_rss.rs @@ -65,7 +65,7 @@ pub async fn get(State(state): State) -> Response { news.remove(0); let (date_str, title) = news.split_once(": ").unwrap(); - let content = title.clone(); + let content = title; // link (id) has to be unique let link = format!("{}#{}", "https://ezrizhu.com/news", (news_len - count).to_string()); count+=1;