Skip to content
This repository has been archived by the owner on Aug 21, 2024. It is now read-only.

Commit

Permalink
Switch to PgPool::connect_lazy
Browse files Browse the repository at this point in the history
  • Loading branch information
0rzech committed Feb 22, 2024
1 parent 08759fe commit ab2e526
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ async fn main() -> Result<(), std::io::Error> {
.await
.expect("Failed to open listener");

let pool = PgPool::connect(config.database.connection_string().expose_secret())
.await
let pool = PgPool::connect_lazy(config.database.connection_string().expose_secret())
.expect("Failed to connect to Postgres");

run(listener, pool).await
Expand Down

0 comments on commit ab2e526

Please sign in to comment.