From c57a2c54f627fec2d3fe60e9cf1802e0da5763dd Mon Sep 17 00:00:00 2001 From: Erin Date: Mon, 15 Apr 2024 06:50:31 -0400 Subject: [PATCH] remove unnecessary turbofish --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 1631f3d..b31f73e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -27,7 +27,7 @@ async fn get_comments(pool: &SqlitePool, page: &str) -> Result, sql #[rocket::get("/txt?")] async fn txt(page: &str, pool: &rocket::State) -> Result { - Ok(get_comments(pool, page) + let text = get_comments(pool, page) .await .map_err(|_| "error fetching comments for this page, sorry")? .into_iter() @@ -39,7 +39,8 @@ async fn txt(page: &str, pool: &rocket::State) -> Result()) + .collect(); + Ok(text) } #[rocket::get("/html?")]