remove unnecessary turbofish
This commit is contained in:
parent
70d4ae809a
commit
c57a2c54f6
|
@ -27,7 +27,7 @@ async fn get_comments(pool: &SqlitePool, page: &str) -> Result<Vec<Comment>, sql
|
|||
|
||||
#[rocket::get("/txt?<page>")]
|
||||
async fn txt(page: &str, pool: &rocket::State<SqlitePool>) -> Result<String, String> {
|
||||
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<SqlitePool>) -> Result<String, Str
|
|||
rec.content,
|
||||
)
|
||||
})
|
||||
.collect::<String>())
|
||||
.collect();
|
||||
Ok(text)
|
||||
}
|
||||
|
||||
#[rocket::get("/html?<page>")]
|
||||
|
|
Loading…
Reference in a new issue