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>")]
|
#[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>")]
|
||||||
|
|
Loading…
Reference in a new issue