Fix minor formatting issues in 'todo' example.

This commit is contained in:
Sergio Benitez 2020-06-08 12:18:29 -07:00
parent a4f5be93ef
commit e1a3d2b6e8
1 changed files with 2 additions and 2 deletions

View File

@ -35,12 +35,12 @@ struct Context<'a> {
impl<'a> Context<'a> { impl<'a> Context<'a> {
pub fn err(conn: &DbConn, msg: &'a str) -> 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> { pub fn raw(conn: &DbConn, msg: Option<(&'a str, &'a str)>) -> Context<'a> {
match Task::all(conn) { match Task::all(conn) {
Ok(tasks) => Context { msg, tasks}, Ok(tasks) => Context { msg, tasks },
Err(e) => { Err(e) => {
error_!("DB Task::all() error: {}", e); error_!("DB Task::all() error: {}", e);
Context { Context {