Remove .clone() in favor of borrowing

This commit is contained in:
spikecodes 2021-01-01 12:55:09 -08:00
parent d43b49e7e4
commit 59ef30c76d
6 changed files with 16 additions and 21 deletions

View file

@ -26,7 +26,7 @@ pub async fn find(req: HttpRequest) -> Result<HttpResponse> {
};
let sub = req.match_info().get("sub").unwrap_or("").to_string();
let posts = fetch_posts(path.clone(), String::new()).await;
let posts = fetch_posts(&path, String::new()).await;
if posts.is_err() {
error(posts.err().unwrap().to_string()).await