mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-14 14:02:50 +00:00
Optimize use of Result<>
This commit is contained in:
parent
0adbb1556e
commit
7e96bb3d80
6 changed files with 31 additions and 31 deletions
|
@ -36,12 +36,12 @@ pub async fn page(req: HttpRequest) -> HttpResponse {
|
|||
};
|
||||
|
||||
match fetch_posts(&path, String::new()).await {
|
||||
Ok(items) => {
|
||||
Ok((posts,after)) => {
|
||||
let s = SubredditTemplate {
|
||||
sub: sub_result,
|
||||
posts: items.0,
|
||||
posts: posts,
|
||||
sort: (sort, param(&path, "t")),
|
||||
ends: (param(&path, "after"), items.1),
|
||||
ends: (param(&path, "after"), after),
|
||||
layout: cookie(req, "layout"),
|
||||
}
|
||||
.render()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue