Skip to content

Commit 4fe00d7

Browse files
committed
fix AnyConnectionBackend for mysql and sqlite
1 parent 64efad6 commit 4fe00d7

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

sqlx-mysql/src/any.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::{
66
use either::Either;
77
use futures_core::future::BoxFuture;
88
use futures_core::stream::BoxStream;
9-
use futures_util::{stream, StreamExt, TryFutureExt, TryStreamExt};
9+
use futures_util::{stream, FutureExt, StreamExt, TryFutureExt, TryStreamExt};
1010
use sqlx_core::any::{
1111
Any, AnyArguments, AnyColumn, AnyConnectOptions, AnyConnectionBackend, AnyQueryResult, AnyRow,
1212
AnyStatement, AnyTypeInfo, AnyTypeInfoKind,
@@ -26,27 +26,27 @@ impl AnyConnectionBackend for MySqlConnection {
2626
}
2727

2828
fn close(self: Box<Self>) -> BoxFuture<'static, sqlx_core::Result<()>> {
29-
Connection::close(*self)
29+
Connection::close(*self).boxed()
3030
}
3131

3232
fn close_hard(self: Box<Self>) -> BoxFuture<'static, sqlx_core::Result<()>> {
33-
Connection::close_hard(*self)
33+
Connection::close_hard(*self).boxed()
3434
}
3535

3636
fn ping(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
37-
Connection::ping(self)
37+
Connection::ping(self).boxed()
3838
}
3939

4040
fn begin(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
41-
MySqlTransactionManager::begin(self)
41+
MySqlTransactionManager::begin(self).boxed()
4242
}
4343

4444
fn commit(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
45-
MySqlTransactionManager::commit(self)
45+
MySqlTransactionManager::commit(self).boxed()
4646
}
4747

4848
fn rollback(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
49-
MySqlTransactionManager::rollback(self)
49+
MySqlTransactionManager::rollback(self).boxed()
5050
}
5151

5252
fn start_rollback(&mut self) {
@@ -58,7 +58,7 @@ impl AnyConnectionBackend for MySqlConnection {
5858
}
5959

6060
fn flush(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
61-
Connection::flush(self)
61+
Connection::flush(self).boxed()
6262
}
6363

6464
fn should_flush(&self) -> bool {

sqlx-sqlite/src/any.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::{
44
};
55
use futures_core::future::BoxFuture;
66
use futures_core::stream::BoxStream;
7-
use futures_util::{StreamExt, TryFutureExt, TryStreamExt};
7+
use futures_util::{FutureExt, StreamExt, TryFutureExt, TryStreamExt};
88

99
use sqlx_core::any::{
1010
Any, AnyArguments, AnyColumn, AnyConnectOptions, AnyConnectionBackend, AnyQueryResult, AnyRow,
@@ -26,27 +26,27 @@ impl AnyConnectionBackend for SqliteConnection {
2626
}
2727

2828
fn close(self: Box<Self>) -> BoxFuture<'static, sqlx_core::Result<()>> {
29-
Connection::close(*self)
29+
Connection::close(*self).boxed()
3030
}
3131

3232
fn close_hard(self: Box<Self>) -> BoxFuture<'static, sqlx_core::Result<()>> {
33-
Connection::close_hard(*self)
33+
Connection::close_hard(*self).boxed()
3434
}
3535

3636
fn ping(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
37-
Connection::ping(self)
37+
Connection::ping(self).boxed()
3838
}
3939

4040
fn begin(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
41-
SqliteTransactionManager::begin(self)
41+
SqliteTransactionManager::begin(self).boxed()
4242
}
4343

4444
fn commit(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
45-
SqliteTransactionManager::commit(self)
45+
SqliteTransactionManager::commit(self).boxed()
4646
}
4747

4848
fn rollback(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
49-
SqliteTransactionManager::rollback(self)
49+
SqliteTransactionManager::rollback(self).boxed()
5050
}
5151

5252
fn start_rollback(&mut self) {
@@ -58,7 +58,7 @@ impl AnyConnectionBackend for SqliteConnection {
5858
}
5959

6060
fn flush(&mut self) -> BoxFuture<'_, sqlx_core::Result<()>> {
61-
Connection::flush(self)
61+
Connection::flush(self).boxed()
6262
}
6363

6464
fn should_flush(&self) -> bool {

0 commit comments

Comments
 (0)