Skip to content

Commit 892c495

Browse files
committed
Rustfmt
1 parent 2bbd81e commit 892c495

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,11 @@ use futures::{Future, Stream};
7272
mod mysql;
7373
#[cfg(feature = "postgres")]
7474
mod pg;
75+
#[cfg(any(feature = "deadpool", feature = "bb8", feature = "mobc"))]
76+
pub mod pooled_connection;
7577
mod run_query_dsl;
7678
mod stmt_cache;
7779
mod transaction_manager;
78-
#[cfg(any(feature = "deadpool", feature = "bb8", feature = "mobc"))]
79-
pub mod pooled_connection;
8080

8181
#[cfg(feature = "mysql")]
8282
pub use self::mysql::AsyncMysqlConnection;

src/pooled_connection/mod.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//! * [bb8](self::bb8)
77
//! * [mobc](self::mobc)
88
9-
use crate::{AsyncConnection, AsyncConnectionGatWorkaround, SimpleAsyncConnection};
109
use crate::TransactionManager;
10+
use crate::{AsyncConnection, AsyncConnectionGatWorkaround, SimpleAsyncConnection};
1111
use std::fmt;
1212
use std::marker::PhantomData;
1313
use std::ops::DerefMut;
@@ -60,7 +60,7 @@ impl<C> AsyncDieselConnectionManager<C> {
6060
pub fn new(connection_url: impl Into<String>) -> Self {
6161
Self {
6262
p: PhantomData,
63-
connection_url: connection_url.into()
63+
connection_url: connection_url.into(),
6464
}
6565
}
6666
}
@@ -98,12 +98,13 @@ where
9898
{
9999
type Backend = <C::Target as AsyncConnection>::Backend;
100100

101-
type TransactionManager = PoolTransactionManager<<C::Target as AsyncConnection>::TransactionManager>;
101+
type TransactionManager =
102+
PoolTransactionManager<<C::Target as AsyncConnection>::TransactionManager>;
102103

103104
async fn establish(_database_url: &str) -> diesel::ConnectionResult<Self> {
104-
Err(diesel::result::ConnectionError::BadConnection(String::from(
105-
"Cannot directly establish a pooled connection",
106-
)))
105+
Err(diesel::result::ConnectionError::BadConnection(
106+
String::from("Cannot directly establish a pooled connection"),
107+
))
107108
}
108109

109110
fn load<'conn, 'query, T>(

0 commit comments

Comments
 (0)