Skip to content

Commit

Permalink
fixup! chore: introduce formatting patterns
Browse files Browse the repository at this point in the history
  • Loading branch information
leona-ya committed Jul 6, 2024
1 parent ad144e2 commit 70fb5c5
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/db/cost_centres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ impl DBCostCentre {
}

pub(crate) async fn update(id: i64, name: &str, connection: &mut PgConnection) -> DBResult<DBCostCentre> {
Ok(
sqlx::query_as!(DBCostCentre, r#"UPDATE "cost_centre" SET "name" = $2 WHERE id = $1 RETURNING *"#, id, name,)
.fetch_one(connection)
.await?,
)
sqlx::query_as!(DBCostCentre, r#"UPDATE "cost_centre" SET "name" = $2 WHERE id = $1 RETURNING *"#, id, name,)
.fetch_one(connection)
.await
}

pub(crate) async fn delete(id: i64, connection: &mut PgConnection) -> DBResult<()> {
Expand Down

0 comments on commit 70fb5c5

Please sign in to comment.