From fc5d9935df947f2d7440701bc3eb8a5e93b039e5 Mon Sep 17 00:00:00 2001 From: Alexey Orlenko Date: Tue, 21 Nov 2023 21:32:18 +0100 Subject: [PATCH] Use store instead of swap --- query-engine/driver-adapters/src/proxy.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/query-engine/driver-adapters/src/proxy.rs b/query-engine/driver-adapters/src/proxy.rs index 000203c0d228..c3d5a3eaf037 100644 --- a/query-engine/driver-adapters/src/proxy.rs +++ b/query-engine/driver-adapters/src/proxy.rs @@ -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 } @@ -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 } }