Skip to content

Commit

Permalink
Use store instead of swap
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Nov 21, 2023
1 parent 47179e6 commit fc5d993
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions query-engine/driver-adapters/src/proxy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ impl TransactionProxy {
/// so the destructor will ensure the transaction is closed even if the future is dropped.
pub async fn commit(&self) -> quaint::Result<()> {
let result = self.commit.call(()).await;
self.closed.swap(true, Ordering::Release);
self.closed.store(true, Ordering::Release);
result
}

Expand All @@ -610,7 +610,7 @@ impl TransactionProxy {
/// so the destructor will ensure the transaction is closed even if the future is dropped.
pub async fn rollback(&self) -> quaint::Result<()> {
let result = self.rollback.call(()).await;
self.closed.swap(true, Ordering::Release);
self.closed.store(true, Ordering::Release);
result
}
}
Expand Down

0 comments on commit fc5d993

Please sign in to comment.