Run rustfmt on example

This commit is contained in:
Ryan Leckey 2019-08-06 23:14:30 -07:00
parent 9df8813d4b
commit c60859b416

View File

@ -8,18 +8,16 @@ use structopt::StructOpt;
#[derive(StructOpt, Debug)]
struct Options {
#[structopt(subcommand)]
cmd: Option<Command>
cmd: Option<Command>,
}
#[derive(StructOpt, Debug)]
enum Command {
#[structopt(name = "add")]
Add {
text: String,
},
Add { text: String },
#[structopt(name = "done")]
MarkAsDone { id: i64 }
MarkAsDone { id: i64 },
}
#[runtime::main(runtime_tokio::Tokio)]
@ -107,9 +105,9 @@ INSERT INTO tasks ( text )
VALUES ( $1 )
"#,
)
.bind(text)
.execute()
.await?;
.bind(text)
.execute()
.await?;
Ok(())
}
@ -123,9 +121,9 @@ SET done_at = now()
WHERE id = $1
"#,
)
.bind(id)
.execute()
.await?;
.bind(id)
.execute()
.await?;
Ok(())
}