Skip to content

Commit

Permalink
Feedback & cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SevInf committed Oct 9, 2024
1 parent 9818106 commit 44fc31a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
1 change: 0 additions & 1 deletion quaint/src/connector/postgres/native/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ pub(crate) async fn connect_via_websocket(url: PostgresWebSocketUrl) -> crate::R

let connection_params = require_header_value(response.headers(), CONNECTION_PARAMS_HEADER)?;
let db_host = require_header_value(response.headers(), HOST_HEADER)?;
dbg!(&connection_params);

let config = Config::from_str(connection_params)?;
let ws_byte_stream = WsStream::new(ws_stream);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,10 @@ impl Connection {
let url = MigratePostgresUrl::new(url)?;

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

let version = quaint.version().await.map_err(quaint_err(&url))?;

Expand Down

0 comments on commit 44fc31a

Please sign in to comment.