Skip to content

Commit

Permalink
fix(ci): rustfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
youxq committed Oct 24, 2024
1 parent 878e3f9 commit 5d7dee2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions quaint/src/single.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,7 @@ impl Quaint {
s if s.starts_with("postgres") || s.starts_with("postgresql") => {
let url = connector::PostgresNativeUrl::new(url::Url::parse(s)?)?;
let tls_manager = connector::MakeTlsConnectorManager::new(url.clone());
let psql = connector::PostgreSql::new(url, &tls_manager
).await?;
let psql = connector::PostgreSql::new(url, &tls_manager).await?;
Arc::new(psql) as Arc<dyn Queryable>
}
#[cfg(feature = "mssql-native")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ pub(super) struct Connection(connector::PostgreSql);
impl Connection {
pub(super) async fn new(url: url::Url) -> ConnectorResult<Connection> {
let url = MigratePostgresUrl::new(url)?;

let quaint = match url.0 {
PostgresUrl::Native(ref native_url) => {
let tls_manager = MakeTlsConnectorManager::new(native_url.as_ref().clone());
connector::PostgreSql::new(native_url.as_ref().clone(), &tls_manager).await
},
PostgresUrl::WebSocket(ref ws_url) => {
connector::PostgreSql::new_with_websocket(ws_url.clone()).await
}
PostgresUrl::WebSocket(ref ws_url) => connector::PostgreSql::new_with_websocket(ws_url.clone()).await,
}
.map_err(quaint_err(&url))?;

Expand Down

0 comments on commit 5d7dee2

Please sign in to comment.