From ab2e52686192ee86a51ed383f20f7650ae4f672d Mon Sep 17 00:00:00 2001 From: Piotr Orzechowski Date: Thu, 22 Feb 2024 14:45:48 +0100 Subject: [PATCH] Switch to PgPool::connect_lazy --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index c512104..8e2d75b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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