remove unnecessary turbofish

This commit is contained in:
Erin 2024-04-15 06:50:31 -04:00
parent 70d4ae809a
commit c57a2c54f6
Signed by: erin
SSH key fingerprint: SHA256:clvLPaxKthBet+VUQTKQdDkjaqg2/KnYHQaPASp5pFE

View file

@ -27,7 +27,7 @@ async fn get_comments(pool: &SqlitePool, page: &str) -> Result<Vec<Comment>, sql
#[rocket::get("/txt?<page>")] #[rocket::get("/txt?<page>")]
async fn txt(page: &str, pool: &rocket::State<SqlitePool>) -> Result<String, String> { async fn txt(page: &str, pool: &rocket::State<SqlitePool>) -> Result<String, String> {
Ok(get_comments(pool, page) let text = get_comments(pool, page)
.await .await
.map_err(|_| "error fetching comments for this page, sorry")? .map_err(|_| "error fetching comments for this page, sorry")?
.into_iter() .into_iter()
@ -39,7 +39,8 @@ async fn txt(page: &str, pool: &rocket::State<SqlitePool>) -> Result<String, Str
rec.content, rec.content,
) )
}) })
.collect::<String>()) .collect();
Ok(text)
} }
#[rocket::get("/html?<page>")] #[rocket::get("/html?<page>")]