This commit is contained in:
Billy Chan 2022-12-16 21:36:00 +08:00
parent d6dc3f8a19
commit 7757a46c46
No known key found for this signature in database
GPG Key ID: A2D690CAC7DF3CC7

View File

@ -174,7 +174,7 @@ impl DatabaseTransaction {
/// Commit a transaction atomically /// Commit a transaction atomically
#[instrument(level = "trace")] #[instrument(level = "trace")]
#[allow(unreachable_code)] #[allow(unreachable_code, unused_mut)]
pub async fn commit(mut self) -> Result<(), DbErr> { pub async fn commit(mut self) -> Result<(), DbErr> {
match *self.conn.lock().await { match *self.conn.lock().await {
#[cfg(feature = "sqlx-mysql")] #[cfg(feature = "sqlx-mysql")]
@ -206,7 +206,7 @@ impl DatabaseTransaction {
/// rolls back a transaction in case error are encountered during the operation /// rolls back a transaction in case error are encountered during the operation
#[instrument(level = "trace")] #[instrument(level = "trace")]
#[allow(unreachable_code)] #[allow(unreachable_code, unused_mut)]
pub async fn rollback(mut self) -> Result<(), DbErr> { pub async fn rollback(mut self) -> Result<(), DbErr> {
match *self.conn.lock().await { match *self.conn.lock().await {
#[cfg(feature = "sqlx-mysql")] #[cfg(feature = "sqlx-mysql")]