Upgrade sqlx to 0.7.1 (#48)

This commit is contained in:
Incomplete 2023-10-12 02:37:25 +08:00 committed by GitHub
parent 75e12bac6c
commit 5e4f160d91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ members = ["sqlxmq_macros", "sqlxmq_stress"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
sqlx = { version = "0.6.0", features = ["postgres", "chrono", "uuid"] } sqlx = { version = "0.7.1", features = ["postgres", "chrono", "uuid"] }
tokio = { version = "1.8.3", features = ["full"] } tokio = { version = "1.8.3", features = ["full"] }
dotenv = "0.15.0" dotenv = "0.15.0"
chrono = "0.4.19" chrono = "0.4.19"

View file

@ -142,7 +142,7 @@ impl CurrentJob {
&mut self, &mut self,
mut tx: sqlx::Transaction<'_, Postgres>, mut tx: sqlx::Transaction<'_, Postgres>,
) -> Result<(), sqlx::Error> { ) -> Result<(), sqlx::Error> {
self.delete(&mut tx).await?; self.delete(&mut *tx).await?;
tx.commit().await?; tx.commit().await?;
self.stop_keep_alive().await; self.stop_keep_alive().await;
Ok(()) Ok(())
@ -161,7 +161,7 @@ impl CurrentJob {
mut tx: sqlx::Transaction<'_, Postgres>, mut tx: sqlx::Transaction<'_, Postgres>,
checkpoint: &Checkpoint<'_>, checkpoint: &Checkpoint<'_>,
) -> Result<(), sqlx::Error> { ) -> Result<(), sqlx::Error> {
checkpoint.execute(self.id, &mut tx).await?; checkpoint.execute(self.id, &mut *tx).await?;
tx.commit().await?; tx.commit().await?;
Ok(()) Ok(())
} }