yet another dubious clippy warnings fix re returns
This commit is contained in:
parent
7490567a21
commit
25c40adf20
@ -94,12 +94,12 @@ pub async fn create(
|
|||||||
.worker
|
.worker
|
||||||
.execute(move || broadcast(&user_clone, new_comment, dest));
|
.execute(move || broadcast(&user_clone, new_comment, dest));
|
||||||
|
|
||||||
return Ok(Flash::success(
|
Ok(Flash::success(
|
||||||
Redirect::to(
|
Redirect::to(
|
||||||
uri!(super::posts::details: blog = blog_name, slug = slug, responding_to = _),
|
uri!(super::posts::details: blog = blog_name, slug = slug, responding_to = _),
|
||||||
),
|
),
|
||||||
i18n!(&rockets.intl.catalog, "Your comment has been posted."),
|
i18n!(&rockets.intl.catalog, "Your comment has been posted."),
|
||||||
));
|
))
|
||||||
}
|
}
|
||||||
Err(errors) => {
|
Err(errors) => {
|
||||||
// TODO: de-duplicate this code
|
// TODO: de-duplicate this code
|
||||||
@ -110,7 +110,7 @@ pub async fn create(
|
|||||||
.responding_to
|
.responding_to
|
||||||
.and_then(|r| Comment::get(&*conn, r).ok());
|
.and_then(|r| Comment::get(&*conn, r).ok());
|
||||||
|
|
||||||
return Err(render!(posts::details(
|
Err(render!(posts::details(
|
||||||
&rockets.to_context(),
|
&rockets.to_context(),
|
||||||
post.clone(),
|
post.clone(),
|
||||||
blog,
|
blog,
|
||||||
@ -137,7 +137,7 @@ pub async fn create(
|
|||||||
post.get_authors(&*conn)
|
post.get_authors(&*conn)
|
||||||
.expect("comments::create: authors error")[0]
|
.expect("comments::create: authors error")[0]
|
||||||
.clone()
|
.clone()
|
||||||
)));
|
)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user