Skip to content

Commit

Permalink
fix merge conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
joeydewaal committed Oct 7, 2024
1 parent 0779b1e commit 095c5b4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
14 changes: 7 additions & 7 deletions sqlx-postgres/src/connection/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,14 +185,14 @@ impl Connection for PgConnection {

self.wait_until_ready().await?;

while let Some((id, _)) = self.inner.cache_statement.remove_lru() {
self.inner.stream.write_msg(Close::Statement(id))?;
cleared += 1;
}
while let Some((id, _)) = self.inner.cache_statement.remove_lru() {
self.inner.stream.write_msg(Close::Statement(id))?;
cleared += 1;
}

if cleared > 0 {
self.write_sync();
self.inner.stream.flush().await?;
if cleared > 0 {
self.write_sync();
self.inner.stream.flush().await?;

self.wait_for_close_complete(cleared).await?;
self.recv_ready_for_query().await?;
Expand Down
6 changes: 4 additions & 2 deletions sqlx-postgres/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,10 @@ impl TransactionManager for PgTransactionManager {

async fn rollback(conn: &mut PgConnection) -> Result<(), Error> {
if conn.inner.transaction_depth > 0 {
conn.execute(&*rollback_ansi_transaction_sql(conn.inner.transaction_depth))
.await?;
conn.execute(&*rollback_ansi_transaction_sql(
conn.inner.transaction_depth,
))
.await?;

conn.inner.transaction_depth -= 1;
}
Expand Down

0 comments on commit 095c5b4

Please sign in to comment.