From 2207fed0f577fd68f0b70c53aef3aaa3ba656c89 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Sat, 5 Nov 2022 00:53:46 +0000 Subject: [PATCH] Remove explicit panic from db connection code (fixes #2533) (#2535) --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index 9ef2f541..4667df44 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,8 +78,7 @@ async fn main() -> Result<(), LemmyError> { let pool = Pool::builder() .max_size(settings.database.pool_size) .min_idle(Some(1)) - .build(manager) - .unwrap_or_else(|_| panic!("Error connecting to {}", db_url)); + .build(manager)?; // Run the migrations from code let settings_cloned = settings.to_owned(); -- 2.44.1