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?")]