Housekeeping. Unit tests, coverage, formatter, linter. (#4)
Reviewed-on: #4 Co-authored-by: Drew Galbraith <drew@tiramisu.one> Co-committed-by: Drew Galbraith <drew@tiramisu.one>
This commit is contained in:
parent
ef247e6e29
commit
8dae570755
4 changed files with 8 additions and 7 deletions
|
|
@ -32,7 +32,7 @@ impl TaskModel {
|
|||
title: &str,
|
||||
description: Option<&str>,
|
||||
) -> Result<TaskModel> {
|
||||
if title.len() == 0 {
|
||||
if title.is_empty() {
|
||||
bail!("Title must not be empty");
|
||||
}
|
||||
|
||||
|
|
@ -70,10 +70,10 @@ impl TaskModel {
|
|||
)
|
||||
.bind(&self.title)
|
||||
.bind(&self.description)
|
||||
.bind(&self.status)
|
||||
.bind(self.status)
|
||||
.bind(now)
|
||||
.bind(&self.completed_at)
|
||||
.bind(&self.id)
|
||||
.bind(self.completed_at)
|
||||
.bind(self.id)
|
||||
.execute(pool)
|
||||
.await?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue