mirror of
https://github.com/rwf2/Rocket.git
synced 2025-01-29 21:02:07 +00:00
Fix minor formatting issues in 'todo' example.
This commit is contained in:
parent
a4f5be93ef
commit
e1a3d2b6e8
@ -35,12 +35,12 @@ struct Context<'a> {
|
||||
|
||||
impl<'a> Context<'a> {
|
||||
pub fn err(conn: &DbConn, msg: &'a str) -> Context<'a> {
|
||||
Context{msg: Some(("error", msg)), tasks: Task::all(conn).unwrap_or_default()}
|
||||
Context { msg: Some(("error", msg)), tasks: Task::all(conn).unwrap_or_default() }
|
||||
}
|
||||
|
||||
pub fn raw(conn: &DbConn, msg: Option<(&'a str, &'a str)>) -> Context<'a> {
|
||||
match Task::all(conn) {
|
||||
Ok(tasks) => Context { msg, tasks},
|
||||
Ok(tasks) => Context { msg, tasks },
|
||||
Err(e) => {
|
||||
error_!("DB Task::all() error: {}", e);
|
||||
Context {
|
||||
|
Loading…
Reference in New Issue
Block a user